ref0<T> function Null safety

Parser<T> ref0<T>(
  1. Parser<T> function(
      )
    )

    Creates a Parser from a function without arguments.

    Reference parsers behave like normal parsers during construction, but can recursively reference each other. Once the parser is assembled resolve all references by passing the root of your parser to resolve.

    If you function takes arguments, consider one of the typed alternatives ref1, ref2, ref3, ... instead.

    Implementation

    Parser<T> ref0<T>(Parser<T> Function() function) =>
        ReferenceParser<T>(function, const []);