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

Document the parsing rules for arithmetic expressions #314

Open
petdance opened this issue Sep 20, 2023 · 0 comments
Open

Document the parsing rules for arithmetic expressions #314

petdance opened this issue Sep 20, 2023 · 0 comments

Comments

@petdance
Copy link
Contributor

It seems that TT requires spaces around math operators sometimes. For example this runs just fine:

x = 5;

y = x + 2; ' y='; y;
y = x - 2; ' y='; y;
y = x * 2; ' y='; y;
y = x / 2; ' y='; y;

and gives

 y=7 y=3 y=10 y=2.5

However, this fails parsing:

x = 5;
y = x+2; ' y='; y;
y = x-2; ' y='; y;
y = x*2; ' y='; y;
y = x/2; ' y='; y;

on the x-2. Comment that line out, and it also fails on the x/2.

If it's documented somewhere that x-2 is not valid but x - 2 is, I can't find it.

@petdance petdance changed the title Document the parsing rules Document the parsing rules for arithmetic expressions Sep 20, 2023
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

1 participant