public override Node VisitArrayConstant(MetaCodeParser.ArrayConstantContext context) { var text = context.GetText(); var expressions = context.expression() .Select(expression => expression.Accept(this)) .OfType<ExpressionNode>() .ToArray(); return ConstantLiteralFactory.Array(expressions); }
public override Node VisitAttribute(MetaCodeParser.AttributeContext context) { var name = context.Name.Text; var expressions = context.expression() .Select(expression => expression.Accept(this) as ExpressionNode) .ToArray(); return ConstantLiteralFactory.Attribute(name, expressions); }
public override Node VisitFunctionCallExpression(MetaCodeParser.FunctionCallExpressionContext context) { var functionName = context.functionName.Text; var expressions = context.expression() .Select(expression => expression.Accept(this) as ExpressionNode) .ToArray(); return ExpressionFactory.FunctionCall(functionName, expressions); }