This is to allow the user to override the repr in npegTrace with their own version. system.repr completely blows the trace up when the user uses a type that's not trivial (such as an object). For instance, the following type:
TokenKind* = enum
tkNumber = "number"
tkIdent = "ident"
Token* = object
line*: int
case kind*: TokenKind
of tkNumber: number*: float
of tkIdent: ident*: string
This is to allow the user to override the
repr
in npegTrace with their own version.system.repr
completely blows the trace up when the user uses a type that's not trivial (such as an object). For instance, the following type:Results in traces looking like this:
due to
system.repr
inserting newlines wherever it wants. This PR allows the user to declare their own repr, like so: