public ScriptFunction(Processor processor, Invocation invocation, MegaScryptParser.FuncDeclerationContext declContext) { _declContext = declContext; _name = TryFindName(processor); if (declContext.varList() != null) { _parameterNames = declContext.varList().Accept(processor) as List <string>; } else { _parameterNames = new List <string>(); } _invocation = invocation; }
/// <summary> /// Visit a parse tree produced by <see cref="MegaScryptParser.funcDecleration"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitFuncDecleration([NotNull] MegaScryptParser.FuncDeclerationContext context) { return(VisitChildren(context)); }