diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 55312753d1e..b5564973dca 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -13,7 +13,7 @@ module ts { export function createNode(kind: SyntaxKind): Node { return new (getNodeConstructor(kind))(); } - + // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns @@ -386,8 +386,8 @@ module ts { case ParsingContext.HeritageClauses: return Diagnostics.Unexpected_token_expected; } }; - - export function modifierToFlag(token: SyntaxKind): NodeFlags { + + export function modifierToFlag(token: SyntaxKind): NodeFlags { switch (token) { case SyntaxKind.StaticKeyword: return NodeFlags.Static; case SyntaxKind.PublicKeyword: return NodeFlags.Public; @@ -667,7 +667,6 @@ module ts { sourceFile = createNode(SyntaxKind.SourceFile, 0); sourceFile.referenceDiagnostics = []; sourceFile.parseDiagnostics = []; - sourceFile.grammarDiagnostics = []; sourceFile.semanticDiagnostics = []; // Create and prime the scanner before parsing the source elements. @@ -5122,4 +5121,4 @@ module ts { } } } -} \ No newline at end of file +} diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 573072efdcb..8c76cb46693 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -905,10 +905,6 @@ module ts { // missing tokens, or tokens it didn't know how to deal with). parseDiagnostics: Diagnostic[]; - // Grammar errors are for things the parser understood, but either the ES6 or TS grammars - // do not allow (like putting an 'public' modifier on a 'class declaration'). - grammarDiagnostics: Diagnostic[]; - // Returns all syntactic diagnostics (i.e. the reference, parser and grammar diagnostics). getSyntacticDiagnostics(): Diagnostic[]; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index dc47cad5b62..bc66186d2d7 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -263,7 +263,6 @@ module Utils { case "referenceDiagnostics": case "parseDiagnostics": - case "grammarDiagnostics": o[propertyName] = Utils.convertDiagnostics((n)[propertyName]); break; diff --git a/src/services/services.ts b/src/services/services.ts index 84811489a7c..757e1b62083 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -744,7 +744,6 @@ module ts { public referenceDiagnostics: Diagnostic[]; public parseDiagnostics: Diagnostic[]; - public grammarDiagnostics: Diagnostic[]; public semanticDiagnostics: Diagnostic[]; public hasNoDefaultLib: boolean;