public override object VisitLambda([NotNull] LambdaContext context) { var r = new Result { data = "var" }; // 异步 if (context.t.Type == FlowRight) { r.text += "async "; } r.text += "("; if (context.lambdaIn() != null) { r.text += Visit(context.lambdaIn()); } r.text += ")"; r.text += "=>"; if (context.expressionList() != null) { r.text += ((Result)Visit(context.expressionList())).text; } else { r.text += "{" + ProcessFunctionSupport(context.functionSupportStatement()) + "}"; } return(r); }
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); }
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); }