On Sunday, 16 December 2018 at 01:57:17 UTC, Walter Bright wrote:
On 12/15/2018 2:48 PM, Neia Neutuladh wrote:
The way to fix this is to replace the entire parser and get rid of the idea of AST poisoning; at the first error, you give up on parsing the entire file. From there, you can try recovering from specific errors with
proper testing.

DMD tries to continue parsing after a syntax error, but it does not attempt semantic analysis if there were any errors.

The problem i underlined is more that, like in the code that parses typeof, a non null node is returned even if some expectations are not verified when parsing.

I'm not sure of what is the right fix. fixing the ast pretty printer or the parser ?

Reply via email to