Fixed issue where parser improperly parses a function declaration with no identifier.

This commit is contained in:
Daniel Rosenwasser
2014-09-17 15:28:41 -07:00
parent d6888b2834
commit e69b9e6362
4 changed files with 12 additions and 9 deletions

View File

@@ -1,6 +1,4 @@
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction1.ts (2 errors) ====
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction1.ts (1 errors) ====
function =>
~~
!!! Identifier expected.
!!! Function implementation is missing or not immediately following the declaration.
!!! Identifier expected.

View File

@@ -1,4 +1,4 @@
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction2.ts (5 errors) ====
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction2.ts (4 errors) ====
function (a => b;
~
!!! Identifier expected.
@@ -7,6 +7,4 @@
~
!!! ',' expected.
!!! ')' expected.
!!! Function implementation is missing or not immediately following the declaration.
!!! ')' expected.