RFR: 8375646: Some parser flags seem unused [v3]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Jan 19 20:25:42 UTC 2026
> 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`).
Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
Address review comments
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/29302/files
- new: https://git.openjdk.org/jdk/pull/29302/files/01cfaf20..2cfc5de0
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=29302&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=29302&range=01-02
Stats: 6 lines in 1 file changed: 0 ins; 6 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/29302.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29302/head:pull/29302
PR: https://git.openjdk.org/jdk/pull/29302
More information about the compiler-dev
mailing list