Hi all.
I have just started using PEGTL, so I beg for patience - maybe I overlooked alternatives for this:
I try to implement a grammar for which I find the contrib/trace a bit too verbose in some cases.
I suggest to add a "nofollow" option which still traces the current node but not any child.
I attached a possible implementation. Usage:
struct my_rule : sor</* ... */>, trace_nofollow {};
This will still trace my_rule but nothing under it.
Cheers, George
trace-nofollow.diff.gz
Hi all.
I have just started using PEGTL, so I beg for patience - maybe I overlooked alternatives for this:
I try to implement a grammar for which I find the contrib/trace a bit too verbose in some cases.
I suggest to add a "nofollow" option which still traces the current node but not any child.
I attached a possible implementation. Usage:
This will still trace
my_rulebut nothing under it.Cheers, George
trace-nofollow.diff.gz