-
Notifications
You must be signed in to change notification settings - Fork 228
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
operators are not applyed to a function's return value #733
Comments
Okay this is truly weird. The code produced by
The code produced by
Literally identical. The "not" operator is being completely and utterly ignored by the compiler somehow in this case. Interestingly, changing the example to
The insertion of the opcode: 0020 not No idea why. It's NOT order of operations, because this: |
I pulled up TinyPg to see what the parse tree really looks like for print truth() is:
print not truth() is:
So the NOT does parse but... the compiler isn't noticing it... garrg. |
ahhhhhhh crud. The same problem happens with '-', when used as unary operator to negate a value, rather than a binary operator for subtraction. i.e. like so: They have tighter precedence than than the function_trailer does. Also, colons for suffixes are the same way:
It tried to do the NOT first, and THEN the colon operator. I am hoping the fix is just purely moving the unary operators out of the atom level of the parser and putting them a bit higher up. |
The text was updated successfully, but these errors were encountered: