Exemple #1
0
 /// <inheritdoc/>
 public virtual ParseNode Visit(SignatureParseNode spn)
 {
     foreach (var n in spn.Parts)
     {
         n.Visit(this);
     }
     return(spn);
 }
Exemple #2
0
        public XmlElement Visit(SignatureParseNode spn)
        {
            var el = makeNode(spn, "signature");

            addProperty(el, "name", spn.Name);
            addProperty(el, "returntype", spn.ReturnType);
            addProperty(el, "annotations", spn.Annotations);
            addProperty(el, "parts", spn.Parts);
            return(el);
        }
Exemple #3
0
        /// <inheritdoc />
        public Node Visit(SignatureParseNode spn)
        {
            var ret = new SignatureNode(spn.Token, spn);

            foreach (var part in spn.Parts)
            {
                ret.AddPart((SignaturePartNode)part.Visit(this));
            }
            if (spn.ReturnType != null)
            {
                ret.ReturnType = spn.ReturnType.Visit(this);
            }
            addAnnotations(spn.Annotations, ret.Annotations);
            return(ret);
        }
Exemple #4
0
        /// <inheritdoc />
        public Node Visit(TypeStatementParseNode tspn)
        {
            var meth = new MethodDeclarationParseNode(tspn.Token);
            var spn  = new SignatureParseNode(tspn.Token);
            var spp  = new OrdinarySignaturePartParseNode((IdentifierParseNode)tspn.BaseName);

            spp.GenericParameters = tspn.GenericParameters;
            spn.AddPart(spp);
            meth.Signature = spn;
            var tpn = tspn.Body as InterfaceParseNode;

            if (tpn != null)
            {
                tpn.Name = ((IdentifierParseNode)tspn.BaseName).Name;
            }
            meth.Body.Add(tspn.Body);
            return(meth.Visit(this));
        }