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

[apex] Support null coalescing operator ?? (apex 60) #4828

Closed
vctqs1 opened this issue Feb 19, 2024 · 0 comments · Fixed by #4848
Closed

[apex] Support null coalescing operator ?? (apex 60) #4828

vctqs1 opened this issue Feb 19, 2024 · 0 comments · Fixed by #4848
Labels
an:enhancement An improvement on existing features / rules in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception
Milestone

Comments

@vctqs1
Copy link

vctqs1 commented Feb 19, 2024

Is your feature request related to a problem? Please describe.
I am currently in the process of updating my Apex codebase to version 60, and I've introduced the use of the null coalescing operator ??, which is a new feature in Apex v60. However, I encountered an issue with PMD, as it is unable to parse this syntax. The specific error message I received is as follows:

net.sourceforge.pmd.lang.ast.ParseException: Parse exception in file './packages/user/main/default/classes/ParentAffiliationHandler.cls' at line 35, column 91: apex.jorje.services.exception.ParseException: Syntax(error = UnexpectedToken(loc = (35, 91, 290, 291), token = '?'))

Describe the solution you'd like
I am seeking a resolution that allows PMD to successfully parse and support the new null coalescing operator ?? introduced in Apex version 60.

Reference Documentation

@vctqs1 vctqs1 added the an:enhancement An improvement on existing features / rules label Feb 19, 2024
@adangel adangel changed the title Support apex-60 [apex] Support null coalsecing operator ?? (apex 60) Feb 19, 2024
@adangel adangel added the in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception label Feb 19, 2024
@adangel adangel changed the title [apex] Support null coalsecing operator ?? (apex 60) [apex] Support null coalescing operator ?? (apex 60) Feb 19, 2024
@adangel adangel added this to the 7.0.0 milestone Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
an:enhancement An improvement on existing features / rules in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants