<div dir="ltr"><div>Hi Jan,</div><div>Thank you for your answer. I didn't realize that the cursor of "modifiable" AST was between Flow and TransType, that's one helpful tip.<br></div><div>I had initially implemented something like you suggest (only for syntax errors, trying to "fix" ASTs after parse). For statements, it was easy enough to replace a JCErroneous by a `throw new RuntimeException()`, but the issue was more for random compilation errors in expression, eg</div><div>```</div><div>class A {</div><div>  int n = syntax error here;</div><div>  A p = unresolvedReference();</div><div>  int q = 1 + unresolvedReference().length();<br></div><div>}</div><div>```</div><div>I didn't find a good and generic enough substitute AST to build for those. And that why I though about implementing it on the "backend" part of Javac you described. </div><div>But I have no strong need for this change to be in the "backend", pragmatically, I'd be happy with whatever works; even if I still think that such a feature would be a nice to have directly in Javac.<br></div><div>Can you please elaborate on what substitute AST Netbeans generates for such case? And maybe even link to the piece of code that does it in Netbeans (a quick search wasn't so successful to me)? I would be very happy if we can reuse the code and share the effort.</div><div><br></div><div>Cheers,</div><div>Mickael<br></div></div>