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 unary operator precedence #60

Open
soc opened this issue Oct 30, 2022 · 0 comments
Open

fix unary operator precedence #60

soc opened this issue Oct 30, 2022 · 0 comments
Labels
dora-diverge will cause substantial diversion from dora enhancement improving existing functionality language-core changes to the Core language (syntax, semantics, ...)

Comments

@soc
Copy link
Collaborator

soc commented Oct 30, 2022

Currently we are forced to parenthesize -1 like ...

(-1).plus(2) == 1

... as otherwise the unary - would be applied last, meaning that ...

-1.plus(2)

... and ...

-1 + 2

return different results.

In the context of #6/#81 this means treating - as part of the number literal.

@soc soc added enhancement improving existing functionality dora-diverge will cause substantial diversion from dora language-core changes to the Core language (syntax, semantics, ...) labels Oct 30, 2022
@soc soc added this to the 0.6 – drop the superfluous milestone Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dora-diverge will cause substantial diversion from dora enhancement improving existing functionality language-core changes to the Core language (syntax, semantics, ...)
Projects
None yet
Development

No branches or pull requests

1 participant