Exemplo n.º 1
0
        public LiteValue Visit(SyntaxFunctionNode Node, LiteEnv Env)
        {
            var FuncValue = FuncTable.AddFuncEx(new FuncLite(Node.GetFuncName(), Env,
                                                             Node.GetParamList() as SyntaxParamListStatementNode, Node.GetBlock() as SyntaxBlockStatementNode));

            Env.SetSelf(Node.GetFuncName(), FuncValue);
            return(FuncValue);
        }
Exemplo n.º 2
0
 public void Register(string Name, LiteLangNativeFunc Func)
 {
     Env_.SetSelf(Name, FuncTable.AddFuncEx(new FuncNative(Name, Env_, Func)));
 }