Make fewer direct calls to 'error' and 'errorAtPos' in the parser.

This commit is contained in:
Cyrus Najmabadi
2014-12-01 00:01:41 -08:00
parent a6902af9f0
commit f404212793

View File

@@ -1234,7 +1234,7 @@ module ts {
}
}
else {
error(Diagnostics._0_expected, ";");
parseExpected(SyntaxKind.SemicolonToken);
}
}
@@ -1536,7 +1536,7 @@ module ts {
if (isListTerminator(kind)) {
break;
}
error(Diagnostics._0_expected, ",");
parseExpected(SyntaxKind.CommaToken);
}
else if (isListTerminator(kind)) {
break;