Skip to content

Migrate JavaParser-Based Expression Parsing to Javac API #7176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 80 commits into
base: master
Choose a base branch
from

Conversation

akulk022
Copy link

This pull request introduces a complete replacement of the JavaParser-based expression parsing pipeline in JavaExpressionParseUtil with an implementation based on the standard javac API (com.sun.source.tree.*).

A brief overview of the updated implementation details:

  1. Adding utility support via JavacParseUtil to programmatically parse string expressions into com.sun.source.tree.ExpressionTree nodes.
  2. Implementing ExpressionTreeToJavaExpressionVisitor, a visitor that mirrors the logic of the original ExpressionToJavaExpressionVisitor.
  3. Handling all expression cases such as identifiers, literals, method invocations, field accesses, binary operations, and class literals using javac's AST.

Unit testing was successful on the new changes by running JavaExpressionCheckerTest and the overall framework tests.

akulk022 and others added 30 commits June 20, 2025 14:47
akulk022 and others added 30 commits August 2, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants