Closed vmauery closed 3 weeks ago
This is by design. The ability to be able to trace your parse is essential to writing anything but the simplest of parsers. When you add a new custom parser, it is expected that you also add a function that enables its instrumentation. If you make that a noop, well, "bad programmer!"
When I tried adding a print_parser for my custom parser, ultimately I had to add it before including parser.hpp like this:
And then I could define it later after my parser class. Also, I didn't see anything in the documentation about adding a parser_interface and only managed to find that by reading through other parsers in the parser.hpp file.
I think this could be avoided by adding a default noop print_parser (not sure what this is used for anyway). Or maybe being able to turn this feature off would be good.