allParser function

Iterable<Parser> allParser(
  1. Parser root
)

Returns a lazy iterable over all parsers reachable from root using a depth-first traversal over the connected parser graph.

For example, the following code prints the two parsers of the defined grammar:

final parser = range('0', '9').star();
allParser(parser).forEach((each) {
  print(each);
});

Implementation

Iterable<Parser> allParser(Parser root) => _ParserIterable(root);