ExpressionGroup<T> class
Models a group of operators of the same precedence.
Constructors
-
ExpressionGroup(Parser<
T> _loopback)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
primitives
→ List<
Parser< T> > -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
Parser< T> inner) → Parser<T> -
left<
O> (Parser< O> parser, T callback(T left, O operator, T right)) → void -
Adds a left-associative operator
parser
. Evaluates thecallback
with the parsedleft
term,operator
, andright
term. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
optional(
T value) → void -
Makes the group optional and instead return the provided
value
. -
postfix<
O> (Parser< O> parser, T callback(T value, O operator)) → void -
Adds a postfix operator
parser
. Evaluates thecallback
with the parsedvalue
andoperator
. -
prefix<
O> (Parser< O> parser, T callback(O operator, T value)) → void -
Adds a prefix operator
parser
. Evaluates thecallback
with the parsedoperator
andvalue
. -
primitive(
Parser< T> parser) → void -
Defines a new primitive or literal
parser
. -
right<
O> (Parser< O> parser, T callback(T left, O operator, T right)) → void -
Adds a right-associative operator
parser
. Evaluates thecallback
with the parsedleft
term,operator
, andright
term. -
toString(
) → String -
A string representation of this object.
inherited
-
wrapper<
L, R> (Parser< L> left, Parser<R> right, T callback(L left, T value, R right)) → void -
Defines a new wrapper using
left
andright
parsers, that are typically used for parenthesis. Evaluates thecallback
with the parsedleft
delimiter, thevalue
andright
delimiter.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited