YAMP.ParserExtensions.AddCustomFunction C# (CSharp) Method

AddCustomFunction() public static method

Adds a custom function to be used by the parser (to the primary context).
public static AddCustomFunction ( this parser, String name, FunctionDelegate f ) : void
parser this The parser to extend.
name String /// The name of the symbol corresponding to the function that should be added. ///
f FunctionDelegate /// The function that fulfills the signature Value f(Value v). ///
return void
        public static void AddCustomFunction(this Parser parser, String name, FunctionDelegate f)
        {
            parser.Context.AddFunction(name, new ContainerFunction(name, f));
        }