1 class Command<string name> {
3 string EndCommandName = "";
7 bit IsInlineCommand = 0;
9 bit IsBlockCommand = 0;
10 bit IsBriefCommand = 0;
11 bit IsReturnsCommand = 0;
12 bit IsParamCommand = 0;
13 bit IsTParamCommand = 0;
14 bit IsDeprecatedCommand = 0;
16 bit IsEmptyParagraphAllowed = 0;
18 bit IsVerbatimBlockCommand = 0;
19 bit IsVerbatimBlockEndCommand = 0;
20 bit IsVerbatimLineCommand = 0;
21 bit IsDeclarationCommand = 0;
24 class InlineCommand<string name> : Command<name> {
25 let IsInlineCommand = 1;
28 class BlockCommand<string name> : Command<name> {
29 let IsBlockCommand = 1;
32 class VerbatimBlockCommand<string name> : Command<name> {
33 let EndCommandName = name;
34 let IsVerbatimBlockCommand = 1;
37 multiclass VerbatimBlockCommand<string name, string endCommandName> {
38 def Begin : Command<name> {
39 let EndCommandName = endCommandName;
40 let IsVerbatimBlockCommand = 1;
43 def End : Command<endCommandName> {
44 let IsVerbatimBlockEndCommand = 1;
48 class VerbatimLineCommand<string name> : Command<name> {
49 let IsVerbatimLineCommand = 1;
52 class DeclarationVerbatimLineCommand<string name> :
53 VerbatimLineCommand<name> {
54 let IsDeclarationCommand = 1;
57 def B : InlineCommand<"b">;
58 def C : InlineCommand<"c">;
59 def P : InlineCommand<"p">;
60 def A : InlineCommand<"a">;
61 def E : InlineCommand<"e">;
62 def Em : InlineCommand<"em">;
64 def Brief : BlockCommand<"brief"> { let IsBriefCommand = 1; }
65 def Short : BlockCommand<"short"> { let IsBriefCommand = 1; }
67 def Returns : BlockCommand<"returns"> { let IsReturnsCommand = 1; }
68 def Return : BlockCommand<"return"> { let IsReturnsCommand = 1; }
69 def Result : BlockCommand<"result"> { let IsReturnsCommand = 1; }
71 def Param : BlockCommand<"param"> { let IsParamCommand = 1; }
74 def Tparam : BlockCommand<"tparam"> { let IsTParamCommand = 1; }
77 def Templatefield : BlockCommand<"templatefield"> { let IsTParamCommand = 1; }
79 def Deprecated : BlockCommand<"deprecated"> {
80 let IsEmptyParagraphAllowed = 1;
81 let IsDeprecatedCommand = 1;
84 def Author : BlockCommand<"author">;
85 def Authors : BlockCommand<"authors">;
86 def Bug : BlockCommand<"bug">;
87 def Copyright : BlockCommand<"copyright">;
88 def Date : BlockCommand<"date">;
89 def Details : BlockCommand<"details">;
90 def Invariant : BlockCommand<"invariant">;
91 def Note : BlockCommand<"note">;
92 def Post : BlockCommand<"post">;
93 def Pre : BlockCommand<"pre">;
94 def Remark : BlockCommand<"remark">;
95 def Remarks : BlockCommand<"remarks">;
96 def Sa : BlockCommand<"sa">;
97 def See : BlockCommand<"see">;
98 def Since : BlockCommand<"since">;
99 def Todo : BlockCommand<"todo">;
100 def Version : BlockCommand<"version">;
101 def Warning : BlockCommand<"warning">;
103 defm Code : VerbatimBlockCommand<"code", "endcode">;
104 defm Verbatim : VerbatimBlockCommand<"verbatim", "endverbatim">;
105 defm Htmlonly : VerbatimBlockCommand<"htmlonly", "endhtmlonly">;
106 defm Latexonly : VerbatimBlockCommand<"latexonly", "endlatexonly">;
107 defm Xmlonly : VerbatimBlockCommand<"xmlonly", "endxmlonly">;
108 defm Manonly : VerbatimBlockCommand<"manonly", "endmanonly">;
109 defm Rtfonly : VerbatimBlockCommand<"rtfonly", "endrtfonly">;
111 defm Dot : VerbatimBlockCommand<"dot", "enddot">;
112 defm Msc : VerbatimBlockCommand<"msc", "endmsc">;
114 // These commands have special support in lexer.
115 def FDollar : VerbatimBlockCommand<"f$">; // Inline LaTeX formula
116 defm FBracket : VerbatimBlockCommand<"f[", "f]">; // Displayed LaTeX formula
117 defm FBrace : VerbatimBlockCommand<"f{", "f}">; // LaTeX environment
119 def Defgroup : VerbatimLineCommand<"defgroup">;
120 def Ingroup : VerbatimLineCommand<"ingroup">;
121 def Addtogroup : VerbatimLineCommand<"addtogroup">;
122 def Weakgroup : VerbatimLineCommand<"weakgroup">;
123 def Name : VerbatimLineCommand<"name">;
125 def Section : VerbatimLineCommand<"section">;
126 def Subsection : VerbatimLineCommand<"subsection">;
127 def Subsubsection : VerbatimLineCommand<"subsubsection">;
128 def Paragraph : VerbatimLineCommand<"paragraph">;
130 def Mainpage : VerbatimLineCommand<"mainpage">;
131 def Subpage : VerbatimLineCommand<"subpage">;
132 def Ref : VerbatimLineCommand<"ref">;
135 def Fn : DeclarationVerbatimLineCommand<"fn">;
136 def Namespace : DeclarationVerbatimLineCommand<"namespace">;
137 def Overload : DeclarationVerbatimLineCommand<"overload">;
138 def Property : DeclarationVerbatimLineCommand<"property">;
139 def Typedef : DeclarationVerbatimLineCommand<"typedef">;
140 def Var : DeclarationVerbatimLineCommand<"var">;
142 // HeaderDoc commands.
143 def Class : DeclarationVerbatimLineCommand<"class">;
144 def Interface : DeclarationVerbatimLineCommand<"interface">;
145 def Protocol : DeclarationVerbatimLineCommand<"protocol">;
146 def Category : DeclarationVerbatimLineCommand<"category">;
147 def Template : DeclarationVerbatimLineCommand<"template">;
148 def Function : DeclarationVerbatimLineCommand<"function">;
149 def Method : DeclarationVerbatimLineCommand<"method">;
150 def Callback : DeclarationVerbatimLineCommand<"callback">;
151 def Const : DeclarationVerbatimLineCommand<"const">;
152 def Constant : DeclarationVerbatimLineCommand<"constant">;
153 def Struct : DeclarationVerbatimLineCommand<"struct">;
154 def Union : DeclarationVerbatimLineCommand<"union">;
155 def Enum : DeclarationVerbatimLineCommand<"enum">;