d796bf1e0a
We now no longer fail a speculative parse just because an error was encountered at any point while speculating. instead, we allow the speculative function that is being called to determine if the parse was successful or not. Only if it decides it was not successful is parsing rewound. This improves our error recovery in several cases (esp. around arrow functions). it will also help in a followup refactoring to prevent lookahead/speculative parsing from causing lambda allocations.
10 lines
529 B
Plaintext
10 lines
529 B
Plaintext
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,9): error TS1127: Invalid character.
|
|
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,1): error TS2304: Cannot find name 'Foo'.
|
|
|
|
|
|
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts (2 errors) ====
|
|
Foo<A,B,\ C>(4, 5, 6);
|
|
|
|
!!! error TS1127: Invalid character.
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'Foo'. |