ParseResult constructor

ParseResult(
  1. bool success,
  2. String remaining, {
  3. String? lexeme,
  4. String? ruleName,
  5. String? element,
  6. Stack<ParseResult>? stack,
})

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();