예제 #1
0
        public override Object Visit(InterfaceDefinition node, Object obj)
        {
            for (int i = 0; i < node.MemberCount; i++)
            {
                node.GetMemberElement(i).Accept(this, obj);
            }

            return(null);
        }
예제 #2
0
        public override Object Visit(InterfaceDefinition node, Object obj)
        {
            int indent = Convert.ToInt32(obj);

            this.printIndentation(indent);
            this.output.WriteLine("Interface: {0} [{1}:{2}]", node.Identifier, node.Location.Line, node.Location.Column);

            this.printIndentation(indent + 1);
            this.output.Write("Type: ");
            this.output.WriteLine(printType(node.TypeExpr));

            for (int i = 0; i < node.MemberCount; i++)
            {
                node.GetMemberElement(i).Accept(this, indent + 1);
            }
            return(null);
        }
예제 #3
0
        public override Object Visit(InterfaceDefinition node, Object obj)
        {
            this.currentClass = node.Identifier;

            node.FullName = getClassIdentifier();
            InterfaceType type = new InterfaceType(node.Identifier, node.FullName, node.Modifiers);

            node.TypeExpr = type;
            TypeTable.Instance.AddType(node.FullName, type, new Location(this.currentFile, node.Location.Line, node.Location.Column));

            for (int i = 0; i < node.MemberCount; i++)
            {
                node.GetMemberElement(i).Accept(this, obj);
            }

            this.currentClass = "";
            return(null);
        }