mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 02:30:15 -06:00
Merge branch 'diagnostics' into sourceFileUpdate
Conflicts: src/compiler/parser.ts
This commit is contained in:
commit
f459951431
@ -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 = <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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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[];
|
||||
|
||||
|
||||
@ -263,7 +263,6 @@ module Utils {
|
||||
|
||||
case "referenceDiagnostics":
|
||||
case "parseDiagnostics":
|
||||
case "grammarDiagnostics":
|
||||
o[propertyName] = Utils.convertDiagnostics((<any>n)[propertyName]);
|
||||
break;
|
||||
|
||||
|
||||
@ -744,7 +744,6 @@ module ts {
|
||||
|
||||
public referenceDiagnostics: Diagnostic[];
|
||||
public parseDiagnostics: Diagnostic[];
|
||||
public grammarDiagnostics: Diagnostic[];
|
||||
public semanticDiagnostics: Diagnostic[];
|
||||
|
||||
public hasNoDefaultLib: boolean;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user