Closed thatrandomperson5 closed 1 year ago
Hey Nilts,
I'd say you did not really hit a bug, but more of an under-specified and under-documented area of NPeg. What happens is that the template ends up verbatim in your final grammar, but any symbols it refers to are not automatically bound to the grammar where the template was defined, so your solution to explicitly prefix the library name for any rules it uses is correct.
I'll leave this ticket open for now, if I find some time I will take a look if I can change the behavior to make templates in libraries a bit more useful.
I have a grammar block:
And with normal rules it works fine. But as soon as i add parameterized rules it requires me to add
ib.
in front of everything.Erroring code:
Working code:
I would assume either that this is a bug or i am missing something, either way how do fix this?