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

Should something like - -2 parse? #88

Open
lucianecchi opened this issue Feb 14, 2022 · 1 comment
Open

Should something like - -2 parse? #88

lucianecchi opened this issue Feb 14, 2022 · 1 comment

Comments

@lucianecchi
Copy link

lucianecchi commented Feb 14, 2022

Hi, I am trying to work out a way to properly deal with exponentiation and expressions like -1^-1.5 without having to add a new token type but so far the only way I can think of has as a side effect making - -2 a valid expression. Could it be considered so? Or should it be rejected?
Thank you!

@ymherklotz
Copy link
Member

Yes I think that's fine, that's a proper math expression, as you are just negating the number twice.

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

No branches or pull requests

2 participants