예제 #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);
        }
예제 #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);
        }