Ejemplo n.º 1
0
        public static Comment GetRealCommentInternal(this CppSharp.Parser.AST.BlockContentComment comment, Comment owningComment)
        {
            var realComment = comment.GetRealComment();

            switch (comment.Kind)
            {
            case CppSharp.Parser.AST.CommentKind.BlockCommandComment:
                return(new BlockCommandComment(owningComment, (CppSharp.Parser.AST.BlockCommandComment)realComment));

            case CppSharp.Parser.AST.CommentKind.ParagraphComment:
                return(new ParagraphComment(owningComment, (CppSharp.Parser.AST.ParagraphComment)realComment));

            case CppSharp.Parser.AST.CommentKind.FullComment:
                return(new FullComment(owningComment, (CppSharp.Parser.AST.FullComment)realComment));

            case CppSharp.Parser.AST.CommentKind.InlineContentComment:
                return(new InlineContentComment(owningComment, (CppSharp.Parser.AST.InlineContentComment)realComment));

            case CppSharp.Parser.AST.CommentKind.VerbatimLineComment:
                return(new VerbatimLineComment(owningComment, (CppSharp.Parser.AST.VerbatimLineComment)realComment));

            case CppSharp.Parser.AST.CommentKind.VerbatimBlockLineComment:
                return(new VerbatimBlockLineComment(owningComment, (CppSharp.Parser.AST.VerbatimBlockLineComment)realComment));

            case CppSharp.Parser.AST.CommentKind.ParamCommandComment:
                return(new ParamCommandComment(owningComment, (CppSharp.Parser.AST.ParamCommandComment)realComment));

            case CppSharp.Parser.AST.CommentKind.TParamCommandComment:
                return(new TParamCommandComment(owningComment, (CppSharp.Parser.AST.TParamCommandComment)realComment));

            case CppSharp.Parser.AST.CommentKind.BlockContentComment:
                return(new BlockContentComment(owningComment, (CppSharp.Parser.AST.BlockContentComment)realComment));

            case CppSharp.Parser.AST.CommentKind.VerbatimBlockComment:
                return(new VerbatimBlockComment(owningComment, (CppSharp.Parser.AST.VerbatimBlockComment)realComment));

            case CppSharp.Parser.AST.CommentKind.HTMLTagComment:
                return(new HTMLTagComment(owningComment, (CppSharp.Parser.AST.HTMLTagComment)realComment));

            case CppSharp.Parser.AST.CommentKind.HTMLStartTagComment:
                return(new HTMLStartTagComment(owningComment, (CppSharp.Parser.AST.HTMLStartTagComment)realComment));

            case CppSharp.Parser.AST.CommentKind.HTMLEndTagComment:
                return(new HTMLEndTagComment(owningComment, (CppSharp.Parser.AST.HTMLEndTagComment)realComment));

            case CppSharp.Parser.AST.CommentKind.TextComment:
                return(new TextComment(owningComment, (CppSharp.Parser.AST.TextComment)realComment));

            case CppSharp.Parser.AST.CommentKind.InlineCommandComment:
                return(new InlineCommandComment(owningComment, (CppSharp.Parser.AST.InlineCommandComment)realComment));

            default:
                Debugger.Break();
                return(null);
            }
        }
Ejemplo n.º 2
0
 public unsafe BlockContentComment(Comment owningComment, CppSharp.Parser.AST.BlockContentComment block) : base(block)
 {
     this.OwningComment = owningComment;
     this.block         = block;
     this.block.AssertNotNullAndOfType <CppSharp.Parser.AST.BlockContentComment>();
 }