ParseResult constructor
Creates a ParseResult.
success indicates whether the sequence matched. remaining is the
unconsumed portion of the source string. lexeme is the matched substring.
ruleName and element provide debugging context. stack contains child
parse results.
Implementation
ParseResult(
this.success,
this.remaining, {
this.lexeme,
this.ruleName,
this.element,
Stack<ParseResult>? stack,
}) : stack = stack ?? Stack();