Example #1
0
        public XmlElement Visit(ClassDeclarationParseNode bpn)
        {
            var el = makeNode(bpn, "class-declaration");

            addProperty(el, "signature", bpn.Signature);
            addProperty(el, "body", bpn.Body);
            return(el);
        }
Example #2
0
 /// <inheritdoc/>
 public virtual ParseNode Visit(ClassDeclarationParseNode bpn)
 {
     bpn.Signature.Visit(this);
     foreach (var s in bpn.Body)
     {
         s.Visit(this);
     }
     return(bpn);
 }
Example #3
0
        /// <inheritdoc />
        public Node Visit(ClassDeclarationParseNode d)
        {
            var constructor = new MethodDeclarationParseNode(d.Token);

            constructor.Signature = d.Signature;
            var instanceObj = new ObjectParseNode(d.Token);

            instanceObj.Body = d.Body;
            constructor.Body.Add(instanceObj);
            var ret = (MethodNode)constructor.Visit(this);

            // Classes are public by default.
            // The next line makes them public always; it is not
            // possible to have a confidential class. It is unclear
            // whether that should be permitted or not.
            ret.Confidential = false;
            return(ret);
        }