Integrated: 8315452: Erroneous AST missing modifiers for partial input

Jan Lahoda jlahoda at openjdk.org
Mon Sep 4 09:17:49 UTC 2023


On Thu, 31 Aug 2023 14:25:43 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> Consider code like:
> 
> package test;
> public
> 
> 
> Before [JDK-8305671](https://bugs.openjdk.org/browse/JDK-8305671), this was producing an AST which included the package clause + an ErroneousTree, which contained the `public` as partial modifiers.
> 
> After [JDK-8305671](https://bugs.openjdk.org/browse/JDK-8305671), the `public` is no longer included in the AST, and hence it is invisible for tools that operate on the AST.
> 
> My proposal is to return the `public` back to the AST. Seems that the problem from [JDK-8305671](https://bugs.openjdk.org/browse/JDK-8305671) can be solved by breaking out of the outter loop, instead of inner loop, as it was before [JDK-8305671](https://bugs.openjdk.org/browse/JDK-8305671), without affecting non-eof situations.

This pull request has now been integrated.

Changeset: 84425a62
Author:    Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/84425a62904f84601affc9710eefece88665374a
Stats:     64 lines in 2 files changed: 60 ins; 0 del; 4 mod

8315452: Erroneous AST missing modifiers for partial input

Reviewed-by: vromero

-------------

PR: https://git.openjdk.org/jdk/pull/15517


More information about the compiler-dev mailing list