I noticed some nits about the way tokens are computed:
-
A few assignment operators ( ..= ^= >><= >><= ) seem to cost 2 tokens instead of 1 (all other assignment operators cost 1)
- There seems to be logic that checks the token before '-' to determine if the '-' is a unary operator or not, but it doesn't seem to check newer operators (like &, |, etc.) and thus -1 is considered 2 tokens in things like "a & -1". (Even though it's 1 token in "a + -1")
P#109319 2022-03-28 15:40 ( Edited 2022-03-28 15:42)
2
Good nits, thanks @thisismypassword
I think this is everything:
Missing in the first category were:
..= ^= >><= <<>= |
Missing in the second category were:
\ & | ^^ << >> >>> >>< <<> |
P#109327 2022-03-28 18:09 ( Edited 2022-03-28 18:17)
[Please log in to post a comment]