Skip to content

contrib/trace too verbose #364

Open
Open
@jsawbbo

Description

@jsawbbo

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions