Why does compilation fail only if I use lexy::parse
and not lexy::parse_as_tree
?
#162
-
Here is a working example of the error. If I uncomment dummy() the program no longer compiles, but I am not sure what broke. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You've only used Your issue is that the |
Beta Was this translation helpful? Give feedback.
You've only used
lexy::parse_as_tree
before, which completely ignores allvalue
callbacks. Withlexy::parse
reading from a file, the program no longer compiles because you are now instantiating the callbacks.Your issue is that the
Static
production produces a value of theStatic
tag type, but nobody uses it. You can either uselexy::noop
as the value to not produce a tag type and drop it entirely (https://godbolt.org/z/nPh1dM9aq), store the tag type in the datastructures, or just inline the rule fromStatic
anywhere its used.