Exemple #1
0
        public override object VisitLambda(LambdaContext context)
        {
            this.add_current_set();
            this.add_func_stack();
            var r = (new Result()
            {
                data = "var"
            });

            r.text += "(";
            if (context.lambdaIn() != null)
            {
                r.text += Visit(context.lambdaIn());
            }
            r.text += ")";
            r.text += "=>";
            if (context.tupleExpression() != null)
            {
                r.text += ((Result)(Visit(context.tupleExpression()))).text;
            }
            else
            {
                r.text += (new System.Text.StringBuilder().Append("{").Append(ProcessFunctionSupport(context.functionSupportStatement())).Append("}")).to_str();
            }
            this.delete_current_set();
            if (get_func_async() || context.t.Type == Right_Flow)
            {
                r.text = " async " + r.text;
            }
            this.delete_func_stack();
            return(r);
        }
Exemple #2
0
        public override object VisitLambda(LambdaContext context)
        {
            Add_current_set();
            var r = (new Result("var"));

            r.text += "(";
            if (context.lambdaIn() != null)
            {
                r.text += Visit(context.lambdaIn());
            }
            r.text += ")";
            r.text += "=>";
            if (context.tupleExpression() != null)
            {
                r.text += ((Result)Visit(context.tupleExpression())).text;
            }
            else
            {
                r.text += (new System.Text.StringBuilder().Append("{").Append(ProcessFunctionSupport(context.functionSupportStatement())).Append("}")).To_Str();
            }
            Delete_current_set();
            return(r);
        }