mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Rename method.
This commit is contained in:
parent
9ad6eb21ed
commit
3699a4079f
@ -1585,7 +1585,7 @@ module ts {
|
||||
return isSourceElement(inErrorRecovery);
|
||||
case ParsingContext.BlockStatements:
|
||||
case ParsingContext.SwitchClauseStatements:
|
||||
return isStatement(inErrorRecovery);
|
||||
return isStartOfStatement(inErrorRecovery);
|
||||
case ParsingContext.SwitchClauses:
|
||||
return token === SyntaxKind.CaseKeyword || token === SyntaxKind.DefaultKeyword;
|
||||
case ParsingContext.TypeMembers:
|
||||
@ -2886,7 +2886,7 @@ module ts {
|
||||
return parseFunctionBlock(/*allowYield:*/ false, /* ignoreMissingOpenBrace */ false);
|
||||
}
|
||||
|
||||
if (isStatement(/* inErrorRecovery */ true) && !isStartOfExpressionStatement() && token !== SyntaxKind.FunctionKeyword) {
|
||||
if (isStartOfStatement(/*inErrorRecovery:*/ true) && !isStartOfExpressionStatement() && token !== SyntaxKind.FunctionKeyword) {
|
||||
// Check if we got a plain statement (i.e. no expression-statements, no functions expressions/declarations)
|
||||
//
|
||||
// Here we try to recover from a potential error situation in the case where the
|
||||
@ -3748,7 +3748,7 @@ module ts {
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function isStatement(inErrorRecovery: boolean): boolean {
|
||||
function isStartOfStatement(inErrorRecovery: boolean): boolean {
|
||||
switch (token) {
|
||||
case SyntaxKind.SemicolonToken:
|
||||
// If we're in error recovery, then we don't want to treat ';' as an empty statement.
|
||||
@ -4455,7 +4455,7 @@ module ts {
|
||||
}
|
||||
|
||||
function isSourceElement(inErrorRecovery: boolean): boolean {
|
||||
return isDeclarationStart() || isStatement(inErrorRecovery);
|
||||
return isDeclarationStart() || isStartOfStatement(inErrorRecovery);
|
||||
}
|
||||
|
||||
function parseSourceElement() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user