Remove 'grammarDiagnostics' from SourceFile.

This commit is contained in:
Cyrus Najmabadi
2014-12-16 23:00:14 -08:00
parent 1776734e66
commit 2748a5b163
4 changed files with 3 additions and 10 deletions

View File

@@ -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
@@ -388,8 +388,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;
@@ -535,7 +535,6 @@ module ts {
sourceFile.referenceDiagnostics = [];
sourceFile.parseDiagnostics = [];
sourceFile.grammarDiagnostics = [];
sourceFile.semanticDiagnostics = [];
processReferenceComments();

View File

@@ -890,10 +890,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[];

View File

@@ -263,7 +263,6 @@ module Utils {
case "referenceDiagnostics":
case "parseDiagnostics":
case "grammarDiagnostics":
o[propertyName] = Utils.convertDiagnostics((<any>n)[propertyName]);
break;

View File

@@ -743,7 +743,6 @@ module ts {
public referenceDiagnostics: Diagnostic[];
public parseDiagnostics: Diagnostic[];
public grammarDiagnostics: Diagnostic[];
public semanticDiagnostics: Diagnostic[];
public hasNoDefaultLib: boolean;