public override Node VisitAttributeDeclaration(MetaCodeParser.AttributeDeclarationContext context)
        {
            var attributes = GetAttributes(context.attribute());
            var attributeName = context.AttributeName.Text;
            var parameters = context.formalParameter()
                                    .Select(parameter => parameter.Accept(this) as FormalParameterNode)
                                    .ToArray();

            return StatementFactory.Attribute(attributeName, parameters, attributes);
        }
        public override Node VisitFunctionStatement(MetaCodeParser.FunctionStatementContext context)
        {
            var attributes = GetAttributes(context.attribute());

            var functionName = context.FunctionName.Text;
            var returnType = context.ReturnType.With(type => type.Accept(this) as TypeNameNode);
            var parameters = context.formalParameter()
                                    .Select(parameter => parameter.Accept(this) as FormalParameterNode)
                                    .ToArray();
            var body = context.BodyStatements.Accept(this) as BlockStatementNode;

            return StatementFactory.Function(functionName, returnType, parameters, body, attributes);
        }