You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In other words, there's no difference between the ASTs for ~2 and for 2.
It looks to me as though Ohm is first discarding the node for the literal string "~", and then incorrectly deciding that the rule UnaryExp_bitwise_not has only one node, and hence considering it an intermediate node.
The text was updated successfully, but these errors were encountered:
I'm seeing a similar behaviour, where something like this (simplified):
ComparisonExp =
"a" "IN" aValues
|"b" "IN" bValues
Gives you only the value of aValues or bValues when toAST is called, while I expect to see if the node is called on "a" or "b", and with which operator. Using mapping doesn't work at all, because ComparisonExp only maps to the 0-th place, if I try to access the 1st or 2nd I get an exception.
To be fair, why can't .toAST() generate a complete AST, without discarding literals? Apart from being buggy, it's really hard to read.
Using Ohm 17.1.0, and the following grammar:
I run the following code:
and the output is:
In other words, there's no difference between the ASTs for
~2
and for2
.It looks to me as though Ohm is first discarding the node for the literal string
"~"
, and then incorrectly deciding that the ruleUnaryExp_bitwise_not
has only one node, and hence considering it an intermediate node.The text was updated successfully, but these errors were encountered: