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

feat: allow call suffixes #8

Open
wants to merge 1 commit into
base: semgrep
Choose a base branch
from

Conversation

brandonspark
Copy link

What:

This PR allows call suffixes to appear in assignment expressions, such as

foo().bar = 3

Note that allowing call suffixes with type arguments (which look like foo<T>(4)) caused tests to fail, because of a known ambiguity between type arguments and comparison operations. To ensure this did not happen, I created a new nonterminal which is just call suffixes without type arguments, and only allowed those. For the ones with type arguments, we will need a more sophisticated solution.

Test plan:

make test

@brandonspark brandonspark changed the base branch from main to semgrep June 21, 2023 17:10
@brandonspark brandonspark requested review from a team, aryx and SophiaSR and removed request for a team June 21, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant