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
When parsing the input, we would like to collect all the variables into a list. I.e,, when parsing the string "get $abc, $def", we expect to parse that into ["$abc", "$def"].
Using ctx.VAR__all() (where ctx is the &ListContext argument of visit_list()) results in the following output: "get", "$abc", ",", "$def"
Note that, at the same time, ctx.VAR_(i) produces the expected result:
The text was updated successfully, but these errors were encountered:
dmitrii-ubskii
changed the title
..._all() getters output more tokens than they shouldfoo_all() getters output children that are not of the kind fooAug 22, 2022
I encountered this issue while implementing
grammarVisitorCompat
using antlr-rust v0.3.0-beta.Consider the following grammar:
When parsing the input, we would like to collect all the variables into a list. I.e,, when parsing the string
"get $abc, $def"
, we expect to parse that into["$abc", "$def"]
.Using
ctx.VAR__all()
(wherectx
is the&ListContext
argument ofvisit_list()
) results in the following output:"get", "$abc", ",", "$def"
Note that, at the same time,
ctx.VAR_(i)
produces the expected result:The entire MRE can be found at https://github.com/dmitrii-ubskii/antlr-rust-all-issue
The text was updated successfully, but these errors were encountered: