Context class

An immutable parse context.

Annotations
  • @immutable

Constructors

Context(String buffer, int position)
const

Properties

buffer → String
The buffer we are working on.
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
Returns a result indicating a parse failure.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
success<R>(R result, [int? position]) → Success<R>
Returns a result indicating a parse success.
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