children property

List<Parser> children

Returns a list of directly referenced parsers.

For example, letter().children returns the empty collection [], because the letter parser is a primitive or leaf parser that does not depend or call any other parser.

In contrast, letter().or(digit()).children returns a collection containing both the letter() and digit() parser.

Override this method and Parser.replace in all subclasses that reference other parsers.

Implementation

List<Parser> get children => const [];