Success<R> class
An immutable successful parse result.
Constructors
- Success.new(String buffer, int position, R value)
-
const
Properties
- buffer → String
-
The buffer we are working on.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
Returns the error message of this result, or throws an UnsupportedError
if this is a parse success.
no setteroverride
- position → int
-
The current position in the buffer.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → R
-
Returns the parsed value of this result, or throws a ParserException
if this is a parse failure.
final
Methods
-
failure(
String message, [int? position]) → Failure -
Returns a result indicating a parse failure.
inherited
-
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.
inherited
-
toPositionString(
) → String -
Returns the current line:column position in the buffer.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited