Skip to content

Handle alternate is in exptest syntax#1079

Merged
jasmith-hs merged 2 commits intomasterfrom
handle-alternate-in-exptest-syntax
Jun 9, 2023
Merged

Handle alternate is in exptest syntax#1079
jasmith-hs merged 2 commits intomasterfrom
handle-alternate-in-exptest-syntax

Conversation

@jasmith-hs
Copy link
Copy Markdown
Contributor

Similar to #973, there are several tokens which can be both operators and exptests.

This means you could do both: 1 in [1] or 1 is in [1], with the former being an operator and the latter being parsed as an exptest. We were not handling all of these with the alternate exptest syntax, which looks like exptest:in.evaluate(1, ____int3rpr3t3r____, [1]). We can use the same method to check if a symbol is a valid exptest symbol so that there is consistency.

This was not working properly because `in` is an extension operator as well as an exptest.
This means you could do both: `1 in [1]` or `1 is in [1]`, with the former being an operator and the latter being parsed as an exptest

We have several tokens which can be either exptests or operators so we can check all of them when using the alternate syntax too
@jasmith-hs jasmith-hs requested a review from boulter June 7, 2023 13:43
@jasmith-hs jasmith-hs merged commit 34b0d28 into master Jun 9, 2023
@jasmith-hs jasmith-hs deleted the handle-alternate-in-exptest-syntax branch June 9, 2023 14:56
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