Context class

An immutable parse context.

Annotations
  • @immutable

Constructors

Context(String buffer, int position)
Creates a Context at position in the buffer.
const

Properties

buffer → String
The input buffer being parsed.
final
hashCode → int
The hash code for this object.
no setterinherited
position → int
The current position in the buffer.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

failure(String message, [int? position]) → Failure
Creates a Failure parse result with message at position.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
success<R>(R result, [int? position]) → Success<R>
Creates a Success parse result with result at position.
toPositionString() → String
Returns the current line:column position in the buffer.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited