Esempio n. 1
0
        protected override Variable Evaluate(ParsingScript script)
        {
            string         funcName = Utils.GetToken(script, Constants.TOKEN_SEPARATION);
            ParserFunction function = ParserFunction.GetFunction(funcName);
            CustomFunction custFunc = function as CustomFunction;

            Utils.CheckNotNull(funcName, custFunc);

            string body = Utils.BeautifyScript(custFunc.Body, custFunc.Header);

            Translation.PrintScript(body);

            return(new Variable(body));
        }
Esempio n. 2
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name, true);

            string funcName = args[0].AsString();

            ParserFunction function = ParserFunction.GetFunction(funcName);
            CustomFunction custFunc = function as CustomFunction;

            Utils.CheckNotNull(funcName, custFunc);

            string body = Utils.BeautifyScript(custFunc.Body, custFunc.Header);

            Translation.PrintScript(body);

            return(new Variable(body));
        }