10 ms·
I introduce pseudo tokens in place of missing syntax. Using the option correct converts the pseudo tokens into actual tokens. The pseudo tokens always start w
by austincheney 8y ago
I introduce pseudo tokens in place of missing syntax. Using the option correct converts the pseudo tokens into actual tokens. The pseudo tokens always start with x and can be easily ignored or discarded by any consuming application.
I include the pseudo tokens for two reasons. The first reason is that they allow the parser to reason about the code more closely to the language specification. For example the specification says statements MUST be terminated by a semicolon and if a semicolon is not provided one will be inserted automatically (ASI). The second reason is that the pseudo tokens are necessary to eliminate certain ambiguity necessary for some advanced features.