Exemple #1
0
        public UstNode VisitFunctionExpression([NotNull] DslParser.FunctionExpressionContext context)
        {
            var body = new PatternStatements(
                new Statement[] { new ExpressionStatement((Expression)VisitExpression(context.expression())) });

            return(new AnonymousMethodExpression(new ParameterDeclaration[0], body, context.GetTextSpan(), null));
        }
Exemple #2
0
 public PatternUst VisitFunctionExpression([NotNull] DslParser.FunctionExpressionContext context)
 {
     return(VisitExpression(context.expression())); // TODO: remove FunctionExpression from DSL.
 }