Description
For each case of ThrowSyntaxError
,
- add the error to the log
- move to an appropriate position in the parser's stack, by returning special error codes from the intermediate functions. How far to back up has to be decided individually case by case.
- move to an appropriate position in the input stream of tokens. Again, how far to move forward (or backward!) has to be decided on a case by case basis.
Example
Let's say, that POC on the following code sample:
class TESTCLASS {
function bar(): void {}
let asd: number = 2;
}
- produce more than one error message
- output some AST dump with
--dump-ast
option enabled
Task source
Internal issue #18636.