addFunction method
Registers a function handler with the parser.
This can be used to define custom functions that run native Dart code.
Implementation
void addFunction(String name, dynamic handler) {
if (lex.keywords.containsKey(name)) {
throw FormatException('Cannot redefine existing function $name');
}
lex.keywords[name] = TokenType.FUNC;
functionHandlers[name] = handler;
}