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(parser): Allow complex expressions on RHS of set statements #191

Merged
merged 1 commit into from
Mar 9, 2019

Conversation

sjbarag
Copy link
Owner

@sjbarag sjbarag commented Mar 9, 2019

The parser was a little bit too greedy when attempting to detect set statements, which I should have noticed with the weird workarounds in that function. Now that we're not trying to read an entire expression as the left-hand side of a set statement (e.g. foo + bar *= 3), that complication can be removed.

Arbitrarily complex expressions are now supported on the right-hand side of a set statement, e.g. foo.bar = true and false or 3 > 4

fixes #156

The parser was a little bit too greedy when attempting to detect set
statements, which I should have noticed with the weird workarounds in
that function.  Now that we're _not_ trying to read an entire expression
as the left-hand side of a set statement (e.g.  `foo + bar *= 3`), that
complication can be removed.

Arbitrarily complex expressions are now supported on the right-hand side
of a set statement, e.g. `foo.bar = true and false or 3 > 4`

fixes #156
@sjbarag sjbarag added bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior parser Affects this project's token parser e2e Affects this project's end-to-end test cases (the BrightScript sample files executed during testing) labels Mar 9, 2019
@sjbarag sjbarag merged commit 94dcefc into master Mar 9, 2019
@sjbarag sjbarag deleted the allow-complex-expressions-on-set-rhs branch March 9, 2019 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior e2e Affects this project's end-to-end test cases (the BrightScript sample files executed during testing) parser Affects this project's token parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Boolean logic not working for assignment in dotted "set" notation
1 participant