Dart DocumentationparsersParserAccumulator2

ParserAccumulator2 class

class ParserAccumulator2 {
 final Parser p1, p2;
 ParserAccumulator2(this.p1, this.p2);

 /// Parser sequencing: creates a parser accumulator
 ParserAccumulator3 operator +(Parser p) =>
   new ParserAccumulator3(p1, p2, p);

 /// Action application
 Parser operator ^(Object f(x1, x2)) =>
     success((x1) => (x2) => f(x1, x2)) * p1 * p2;

 /// Creates a [:Parser<List>:] from [this].
 Parser<List> get list =>
     success((x1) => (x2) => [x1, x2]) * p1 * p2;
}

Constructors

new ParserAccumulator2(Parser p1, Parser p2) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
ParserAccumulator2(this.p1, this.p2);

Properties

final Parser<List> list #

Creates a Parser<List> from this.

Parser<List> get list =>
   success((x1) => (x2) => [x1, x2]) * p1 * p2;

final Parser p1 #

final Parser p1

final Parser p2 #

final Parser p1, p2

Operators

ParserAccumulator3 operator +(Parser p) #

Parser sequencing: creates a parser accumulator

ParserAccumulator3 operator +(Parser p) =>
 new ParserAccumulator3(p1, p2, p);

Parser operator ^(Object f(x1, x2)) #

Action application

Parser operator ^(Object f(x1, x2)) =>
   success((x1) => (x2) => f(x1, x2)) * p1 * p2;