mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Merge branch 'assertOnMissingNodes' into release-1.1
This commit is contained in:
@@ -654,7 +654,7 @@ module ts {
|
||||
// applying some stricter checks on that node.
|
||||
function grammarErrorOnNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): void {
|
||||
var span = getErrorSpanForNode(node);
|
||||
var start = skipTrivia(file.text, span.pos);
|
||||
var start = span.end > span.pos ? skipTrivia(file.text, span.pos) : span.pos;
|
||||
var length = span.end - start;
|
||||
|
||||
file.syntacticErrors.push(createFileDiagnostic(file, start, length, message, arg0, arg1, arg2));
|
||||
|
||||
Reference in New Issue
Block a user