-proceedOnError option (like ECJ) ?
Mickael Istria
mistria at redhat.com
Sun Nov 24 14:12:23 UTC 2024
Hi Jan,
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.
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
```
class A {
int n = syntax error here;
A p = unresolvedReference();
int q = 1 + unresolvedReference().length();
}
```
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.
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.
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.
Cheers,
Mickael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20241124/ae696de0/attachment.htm>
More information about the compiler-dev
mailing list