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(parse,interp): Support unary + operator for numbers #615

Merged
merged 1 commit into from
Jan 22, 2021

Conversation

sjbarag
Copy link
Owner

@sjbarag sjbarag commented Jan 22, 2021

BrightScript, like JavaScript and several other languages, supports a leading + sign before numeric literals (and variables, incidentally). Check for + tokens when parsing unary expressions, and evaluate them at runtime (no-op).

fixes #227

BrightScript, like JavaScript and several other languages, supports a
leading `+` sign before numeric literals (and variables, incidentally).
Check for `+` tokens when parsing unary expressions, and evaluate them
at runtime (no-op).

fixes #227
@sjbarag sjbarag added bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior parser Affects this project's token parser interpreter Affects this project's tree-walking interpreter labels Jan 22, 2021
Copy link
Collaborator

@alimnios72 alimnios72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+nice

@sjbarag sjbarag merged commit ba17869 into main Jan 22, 2021
@sjbarag sjbarag deleted the allow-leading-plus-for-positive-numbers branch January 22, 2021 18:53
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 interpreter Affects this project's tree-walking interpreter parser Affects this project's token parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow positive character in for step param
2 participants