This exports a new function from the Grammar::Trace class, "GrammarTraceMode($mode)", to allow toggling trace output at runtime. Supported options are Always (default, matching existing behavior), Never, or Error. In the latter case, the trace will be output only if the Grammar failed to find a match.
This commit builds upon changes made by nkh to cleanup rendering, though that discrete commit has been squashed due to merge conflicts.
This exports a new function from the Grammar::Trace class, "GrammarTraceMode($mode)", to allow toggling trace output at runtime. Supported options are Always (default, matching existing behavior), Never, or Error. In the latter case, the trace will be output only if the Grammar failed to find a match.
This commit builds upon changes made by nkh to cleanup rendering, though that discrete commit has been squashed due to merge conflicts.