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

Improve validation on Expression Statement #234

Conversation

kjonescertinia
Copy link
Contributor

This add validation to ExpressionStatement (expression used as a statement) to handle the equivalent of the "Expression cannot be a statement" error you get in Apex.

There are actually very few expressions that can be used as statements, broadly they are method & constructor call expressions, assignment expressions, new expression. You can also put brackets around these which is a sub expression in our CST.

@kjonescertinia kjonescertinia merged commit cd88962 into main Sep 25, 2023
@kjonescertinia kjonescertinia deleted the 118-missing-handling-expression-can-not-be-a-statement-error branch September 25, 2023 15:23
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