children property
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
@override
List<Parser> get children => [parser1, parser2];