postfix<O, V> method
Adds a postfix operator parser
. Evaluates the optional action
with the
parsed value
and operator
.
Implementation
void postfix<O, V>(Parser<O> parser,
[dynamic Function(V value, O operator)? action]) {
final callback = action ?? (value, operator) => [value, operator];
_postfix
.add(parser.map((operator) => ExpressionResult(operator, callback)));
}