From f40421279333dbe4ca0f7154f140ea2613677e33 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 1 Dec 2014 00:01:41 -0800 Subject: [PATCH] Make fewer direct calls to 'error' and 'errorAtPos' in the parser. --- src/compiler/parser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 2b8acf0feb1..ffd32b6094c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -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;