CommandHandler typedef

CommandHandler = LatexNode? Function(String cmdName, LatexParserContext ctx, LatexTokenStream stream)

Command handler functional interface typedef.

Each handler is responsible for parsing a specific class of LaTeX commands. cmdName is the triggering command name (without backslash), ctx provides the parsing context, and stream provides the token stream.

Implementation

typedef CommandHandler =
    LatexNode? Function(
      String cmdName,
      LatexParserContext ctx,
      LatexTokenStream stream,
    );