@@ -63,6 +63,11 @@ class VerbatimLineCommand<string name> : Command<name> {
63
63
let IsVerbatimLineCommand = 1;
64
64
}
65
65
66
+ class PropertyCommand<string name> : Command<name> {
67
+ let NumArgs = 0;
68
+ let IsInlineCommand = 1;
69
+ }
70
+
66
71
class DeclarationVerbatimLineCommand<string name> :
67
72
VerbatimLineCommand<name> {
68
73
let IsDeclarationCommand = 1;
@@ -275,31 +280,6 @@ def Until : VerbatimLineCommand<"until">;
275
280
276
281
def NoOp : VerbatimLineCommand<"noop">;
277
282
278
- // These have actually no arguments, but we can treat them as line commands.
279
- def CallGraph : VerbatimLineCommand<"callgraph">;
280
- def HideCallGraph : VerbatimLineCommand<"hidecallgraph">;
281
- def CallerGraph : VerbatimLineCommand<"callergraph">;
282
- def HideCallerGraph : VerbatimLineCommand<"hidecallergraph">;
283
- def ShowInitializer : VerbatimLineCommand<"showinitializer">;
284
- def HideInitializer : VerbatimLineCommand<"hideinitializer">;
285
- def ShowRefBy : VerbatimLineCommand<"showrefby">;
286
- def HideRefBy : VerbatimLineCommand<"hiderefby">;
287
- def ShowRefs : VerbatimLineCommand<"showrefs">;
288
- def HideRefs : VerbatimLineCommand<"hiderefs">;
289
-
290
- // These also have no argument.
291
- def Private : VerbatimLineCommand<"private">;
292
- def Protected : VerbatimLineCommand<"protected">;
293
- def Public : VerbatimLineCommand<"public">;
294
- def Pure : VerbatimLineCommand<"pure">;
295
- def Static : VerbatimLineCommand<"static">;
296
-
297
- // These also have no argument.
298
- def NoSubgrouping : VerbatimLineCommand<"nosubgrouping">;
299
- def PrivateSection : VerbatimLineCommand<"privatesection">;
300
- def ProtectedSection : VerbatimLineCommand<"protectedsection">;
301
- def PublicSection : VerbatimLineCommand<"publicsection">;
302
-
303
283
// We might also build proper support for if/ifnot/else/elseif/endif.
304
284
def If : VerbatimLineCommand<"if">;
305
285
def IfNot : VerbatimLineCommand<"ifnot">;
@@ -311,6 +291,32 @@ def Endif : VerbatimLineCommand<"endif">;
311
291
def Cond : VerbatimLineCommand<"cond">;
312
292
def EndCond : VerbatimLineCommand<"endcond">;
313
293
294
+ //===----------------------------------------------------------------------===//
295
+ // PropertyCommand
296
+ //===----------------------------------------------------------------------===//
297
+
298
+ def CallGraph : PropertyCommand<"callgraph">;
299
+ def HideCallGraph : PropertyCommand<"hidecallgraph">;
300
+ def CallerGraph : PropertyCommand<"callergraph">;
301
+ def HideCallerGraph : PropertyCommand<"hidecallergraph">;
302
+ def ShowInitializer : PropertyCommand<"showinitializer">;
303
+ def HideInitializer : PropertyCommand<"hideinitializer">;
304
+ def ShowRefBy : PropertyCommand<"showrefby">;
305
+ def HideRefBy : PropertyCommand<"hiderefby">;
306
+ def ShowRefs : PropertyCommand<"showrefs">;
307
+ def HideRefs : PropertyCommand<"hiderefs">;
308
+
309
+ def Private : PropertyCommand<"private">;
310
+ def Protected : PropertyCommand<"protected">;
311
+ def Public : PropertyCommand<"public">;
312
+ def Pure : PropertyCommand<"pure">;
313
+ def Static : PropertyCommand<"static">;
314
+
315
+ def NoSubgrouping : PropertyCommand<"nosubgrouping">;
316
+ def PrivateSection : PropertyCommand<"privatesection">;
317
+ def ProtectedSection : PropertyCommand<"protectedsection">;
318
+ def PublicSection : PropertyCommand<"publicsection">;
319
+
314
320
//===----------------------------------------------------------------------===//
315
321
// DeclarationVerbatimLineCommand
316
322
//===----------------------------------------------------------------------===//
0 commit comments