diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-06 00:28:32 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-06 00:28:32 +0000 |
commit | 8d3ba23f2d9e6c87794d059412a0808c9cbacb25 (patch) | |
tree | c72c618faeffa1c098c4df33857bd12a72c62fb1 /include/clang/Basic/CommentNodes.td | |
parent | 1838703fea568b394407b83d1055b4c7f52fb105 (diff) |
Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.
Comments AST is modelled along the ideas of HTML AST: block and inline content.
* Block content is a paragraph or a command that has a paragraph as an argument
or verbatim command.
* Inline content is placed within some block. Inline content includes plain
text, inline commands and HTML as tag soup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/CommentNodes.td')
-rw-r--r-- | include/clang/Basic/CommentNodes.td | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/clang/Basic/CommentNodes.td b/include/clang/Basic/CommentNodes.td new file mode 100644 index 0000000000..bcadbace56 --- /dev/null +++ b/include/clang/Basic/CommentNodes.td @@ -0,0 +1,26 @@ +class Comment<bit abstract = 0> { + bit Abstract = abstract; +} + +class DComment<Comment base, bit abstract = 0> : Comment<abstract> { + Comment Base = base; +} + +def InlineContentComment : Comment<1>; + def TextComment : DComment<InlineContentComment>; + def InlineCommandComment : DComment<InlineContentComment>; + def HTMLTagComment : DComment<InlineContentComment, 1>; + def HTMLOpenTagComment : DComment<HTMLTagComment>; + def HTMLCloseTagComment : DComment<HTMLTagComment>; + +def BlockContentComment : Comment<1>; + def ParagraphComment : DComment<BlockContentComment>; + def BlockCommandComment : DComment<BlockContentComment>; + def ParamCommandComment : DComment<BlockCommandComment>; + def VerbatimBlockComment : DComment<BlockCommandComment>; + def VerbatimLineComment : DComment<BlockCommandComment>; + +def VerbatimBlockLineComment : Comment; + +def FullComment : Comment; + |