Skip to content
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

Fix env package name in expression language type identifier #11418

Open
wants to merge 1 commit into
base: 4.8.x
Choose a base branch
from

Conversation

hrothwell
Copy link
Contributor

@hrothwell hrothwell commented Dec 6, 2024

Working on fixing #11410

The root of the issue seems to be from Tokenizer.getNextToken() coupled with how SingleEvaluatedExpressionParser.typeIdentifier() loops through the identifiers.

Tokenizer.getNextToken() has an order in which it checks for token types, when this is called to find the lookahead it doesn't seem to take into account what the previous token was which might be important for things like this type identifier.

While the solution of checking for multiple token types specifically for typeIdentifier() works, it doesn't feel very optimal. Right now it only checks IDENTIFIER or ENVIRONMENT for this specific example, but it should likely also include things like ctx, or any other expected package naming that could trigger another token type if this approach is what gets adopted.

@sdelamo sdelamo added the type: improvement A minor improvement to an existing feature label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants