Integrated: 8375646: Some parser flags seem unused
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jan 21 16:18:52 UTC 2026
On Mon, 19 Jan 2026 16:30:43 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> Some of the flags in `JavacParser` are never set, such as `TYPEARGS` and `NOPARAMS`.
>
> Another flag, namely `NODIAMOND` can easily be avoided by looking ahead one token.
>
> This PR removes all the three flags. The main issue with these changes had to do with removing the `boolean allowDiamon` parameter from the `typeArguments` method, as doing so makes it clash with another similarly named method.
> For this reason, this PR distinguish between:
>
> * `typeArguments` -- a method that parses a type argument list, returns a list of `JCExpression`s
> * `typeApply` -- a method that parses and applies type arguments to an existing type (a `JCExpression). This returns a new `JCExpression` (typically a `JCTypeApply`).
This pull request has now been integrated.
Changeset: 17086d31
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/17086d31196827432477391fd2921a82868eaa05
Stats: 75 lines in 1 file changed: 13 ins; 25 del; 37 mod
8375646: Some parser flags seem unused
Reviewed-by: jlahoda, vromero
-------------
PR: https://git.openjdk.org/jdk/pull/29302
More information about the compiler-dev
mailing list