From a60cf0271595599d8efd9a80b5e5ec110073a9a1 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 10 Apr 2015 19:00:31 -0700 Subject: [PATCH] Address CR --- src/compiler/checker.ts | 8 ++++---- src/compiler/parser.ts | 2 +- src/compiler/types.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4d7cb4c472a..59400b959b3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11924,8 +11924,8 @@ module ts { // GRAMMAR CHECKING function isReservedwordInStrictMode(node: Identifier): boolean { - // Check that originalStrictModeSyntaxKind is less than LastFurtureReservedWord to see if an Identifier is a strict-mode reserved word - return (node.parserContextFlags & ParserContextFlags.StrictMode) && node.originalStrictModeSyntaxKind <= SyntaxKind.LastFutureReservedWord; + // Check that originalKeywordKind is less than LastFurtureReservedWord to see if an Identifier is a strict-mode reserved word + return (node.parserContextFlags & ParserContextFlags.StrictMode) && node.originalKeywordKind <= SyntaxKind.LastFutureReservedWord; } function reportStrictModeGrammarErrorInClassDeclaration(identifier: Identifier, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): boolean { @@ -11945,7 +11945,7 @@ module ts { let nameBindings = impotClause.namedBindings; if (nameBindings.kind === SyntaxKind.NamespaceImport) { let name = (nameBindings).name; - if (name.originalStrictModeSyntaxKind) { + if (name.originalKeywordKind) { let nameText = declarationNameToString(name); return grammarErrorOnNode(name, Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); } @@ -11954,7 +11954,7 @@ module ts { let reportError = false; for (let element of (nameBindings).elements) { let name = element.name; - if (name.originalStrictModeSyntaxKind) { + if (name.originalKeywordKind) { let nameText = declarationNameToString(name); reportError = reportError || grammarErrorOnNode(name, Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a8a3dfbe8d9..56eb6d9aa3c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1489,7 +1489,7 @@ module ts { // Store original token kind if it is not just an Identifier so we can report appropriate error later in type checker if (token !== SyntaxKind.Identifier) { - node.originalStrictModeSyntaxKind = token; + node.originalKeywordKind = token; } node.text = internIdentifier(scanner.getTokenValue()); nextToken(); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index b436ad115f6..bac41694a88 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -387,7 +387,7 @@ module ts { export interface Identifier extends PrimaryExpression { text: string; // Text of identifier (with escapes converted to characters) - originalStrictModeSyntaxKind?: SyntaxKind; // Original syntaxKind which get set so that we can report an error later + originalKeywordKind?: SyntaxKind; // Original syntaxKind which get set so that we can report an error later } export interface QualifiedName extends Node {