Ejemplo n.º 1
0
        /// <summary>
        /// Deep-clone the code object.
        /// </summary>
        public override CodeObject Clone()
        {
            DocCode clone = (DocCode)base.Clone();

            clone.CloneField(ref clone._content, _content);
            return(clone);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Parse a <see cref="DocCode"/>.
        /// </summary>
        public static new DocComment Parse(Parser parser, CodeObject parent, ParseFlags flags)
        {
            DocCode docCode = new DocCode(parser, parent);

            if (AutomaticCodeCleanup && docCode.Content is Expression)
            {
                return(new DocC((Expression)docCode.Content));
            }
            return(docCode);
        }