@@ -8,7 +8,9 @@ private import codeql.swift.generated.MacroRole
88 * The role of a macro, for example #freestanding(declaration) or @attached(member).
99 */
1010class MacroRole extends Generated:: MacroRole {
11- // String representation of the role kind.
11+ /**
12+ * String representation of the role kind.
13+ */
1214 string getKindName ( ) {
1315 this .isExpressionKind ( ) and result = "expression"
1416 or
@@ -29,44 +31,68 @@ class MacroRole extends Generated::MacroRole {
2931 this .isExtensionKind ( ) and result = "extension"
3032 }
3133
32- // Holds for `expression` roles.
34+ /**
35+ * Holds for `expression` roles.
36+ */
3337 predicate isExpressionKind ( ) { this .getKind ( ) = 1 }
3438
35- // Holds for `declaration` roles.
39+ /**
40+ * Holds for `declaration` roles.
41+ */
3642 predicate isDeclarationKind ( ) { this .getKind ( ) = 2 }
3743
38- // Holds for `accessor` roles.
44+ /**
45+ * Holds for `accessor` roles.
46+ */
3947 predicate isAccessorKind ( ) { this .getKind ( ) = 4 }
4048
41- // Holds for `memberAttribute` roles.
49+ /**
50+ * Holds for `memberAttribute` roles.
51+ */
4252 predicate isMemberAttributeKind ( ) { this .getKind ( ) = 8 }
4353
44- // Holds for `member` roles.
54+ /**
55+ * Holds for `member` roles.
56+ */
4557 predicate isMemberKind ( ) { this .getKind ( ) = 16 }
4658
47- // Holds for `peer` roles.
59+ /**
60+ * Holds for `peer` roles.
61+ */
4862 predicate isPeerKind ( ) { this .getKind ( ) = 32 }
4963
50- // Holds for `conformance` roles.
64+ /**
65+ * Holds for `conformance` roles.
66+ */
5167 predicate isConformanceKind ( ) { this .getKind ( ) = 64 }
5268
53- // Holds for `codeItem` roles.
69+ /**
70+ * Holds for `codeItem` roles.
71+ */
5472 predicate isCodeItemKind ( ) { this .getKind ( ) = 128 }
5573
56- // Holds for `extension` roles.
74+ /**
75+ * Holds for `extension` roles.
76+ */
5777 predicate isExtensionKind ( ) { this .getKind ( ) = 256 }
5878
59- // String representation of the syntax kind.
79+ /**
80+ * String representation of the macro syntax.
81+ */
6082 string getMacroSyntaxName ( ) {
6183 this .isFreestandingMacroSyntax ( ) and result = "#freestanding"
6284 or
6385 this .isAttachedMacroSyntax ( ) and result = "@attached"
6486 }
6587
66- // Holds for #freestanding macros.
88+ /**
89+ * Holds for #freestanding macros.
90+ */
6791 predicate isFreestandingMacroSyntax ( ) { this .getMacroSyntax ( ) = 0 }
6892
69- // Holds for @attached macros.
93+ /**
94+ * Holds for @attached macros.
95+ */
7096 predicate isAttachedMacroSyntax ( ) { this .getMacroSyntax ( ) = 1 }
7197
7298 override string toString ( ) { result = this .getMacroSyntaxName ( ) + "(" + this .getKindName ( ) + ")" }
0 commit comments