change method

ParseResult<T> change({
  1. Parser<T>? parser,
  2. bool? successful,
  3. Iterable<SyntaxError> errors = const [],
  4. FileSpan? span,
  5. T? value,
})

Implementation

ParseResult<T> change(
    {Parser<T>? parser,
    bool? successful,
    Iterable<SyntaxError> errors = const [],
    FileSpan? span,
    T? value}) {
  return ParseResult<T>(
    trampoline,
    scanner,
    parser ?? this.parser,
    successful ?? this.successful,
    errors.isNotEmpty ? errors : this.errors,
    span: span ?? this.span,
    value: value ?? this.value,
  );
}