1 /**
2 Copyright: Copyright (c) 2016-2021, Joakim Brännström. All rights reserved.
3 License: MPL-2
4 Author: Joakim Brännström (joakim.brannstrom@gmx.com)
5 
6 This Source Code Form is subject to the terms of the Mozilla Public License,
7 v.2.0. If a copy of the MPL was not distributed with this file, You can obtain
8 one at http://mozilla.org/MPL/2.0/.
9 */
10 module libclang_ast.ast.nodes;
11 
12 string makeNodeClassName(string s) {
13     import std.string;
14 
15     return s[0 .. 1].toUpper ~ s[1 .. $];
16 }
17 
18 // dfmt off
19 immutable string[] TranslationUnitSeq = [
20     "translationUnit"
21     ];
22 // dfmt on
23 
24 // dfmt off
25 immutable string[] ExtraSeq = [
26     "moduleImportDecl",
27     "typeAliasTemplateDecl",
28     "staticAssert",
29     "friendDecl",
30     ];
31 // dfmt on
32 
33 // dfmt off
34 immutable string[] AttributeSeq = [
35     "unexposedAttr",
36     "ibActionAttr",
37     "ibOutletAttr",
38     "ibOutletCollectionAttr",
39     "cxxFinalAttr",
40     "cxxOverrideAttr",
41     "annotateAttr",
42     "asmLabelAttr",
43     "packedAttr",
44     "pureAttr",
45     "constAttr",
46     "noDuplicateAttr",
47     "cudaConstantAttr",
48     "cudaDeviceAttr",
49     "cudaGlobalAttr",
50     "cudaHostAttr",
51     "cudaSharedAttr",
52     "visibilityAttr",
53     "dllExport",
54     "dllImport",
55     ];
56 
57 // dfmt on
58 
59 // dfmt off
60 immutable string[] DeclarationSeq = [
61     "unexposedDecl",
62     "structDecl",
63     "unionDecl",
64     "classDecl",
65     "enumDecl",
66     "fieldDecl",
67     "enumConstantDecl",
68     "functionDecl",
69     "varDecl",
70     "parmDecl",
71     "objCInterfaceDecl",
72     "objCCategoryDecl",
73     "objCProtocolDecl",
74     "objCPropertyDecl",
75     "objCIvarDecl",
76     "objCInstanceMethodDecl",
77     "objCClassMethodDecl",
78     "objCImplementationDecl",
79     "objCCategoryImplDecl",
80     "typedefDecl",
81     "cxxMethod",
82     "namespace",
83     "linkageSpec",
84     "constructor",
85     "destructor",
86     "conversionFunction",
87     "templateTypeParameter",
88     "nonTypeTemplateParameter",
89     "templateTemplateParameter",
90     "functionTemplate",
91     "classTemplate",
92     "classTemplatePartialSpecialization",
93     "namespaceAlias",
94     "usingDirective",
95     "typeAliasDecl",
96     "objCSynthesizeDecl",
97     "objCDynamicDecl",
98     "cxxAccessSpecifier",
99     ];
100 // dfmt on
101 
102 // dfmt off
103 immutable string[] DirectiveSeq = [
104     "ompParallelDirective",
105     "ompSimdDirective",
106     "ompForDirective",
107     "ompSectionsDirective",
108     "ompSectionDirective",
109     "ompSingleDirective",
110     "ompParallelForDirective",
111     "ompParallelSectionsDirective",
112     "ompTaskDirective",
113     "ompMasterDirective",
114     "ompCriticalDirective",
115     "ompTaskyieldDirective",
116     "ompBarrierDirective",
117     "ompTaskwaitDirective",
118     "ompFlushDirective",
119     "ompOrderedDirective",
120     "ompAtomicDirective",
121     "ompForSimdDirective",
122     "ompParallelForSimdDirective",
123     "ompTargetDirective",
124     "ompTeamsDirective",
125     "ompTaskgroupDirective",
126     "ompCancellationPointDirective",
127     "ompCancelDirective",
128     "ompTargetDataDirective",
129     "ompTaskLoopDirective",
130     "ompTaskLoopSimdDirective",
131     "ompDistributeDirective",
132     "ompTargetEnterDataDirective",
133     "ompTargetExitDataDirective",
134     "ompTargetParallelDirective",
135     "ompTargetParallelForDirective",
136     "ompTargetUpdateDirective",
137     "ompDistributeParallelForDirective",
138     "ompDistributeParallelForSimdDirective",
139     "ompDistributeSimdDirective",
140     "ompTargetParallelForSimdDirective",
141     "ompTargetSimdDirective",
142     "ompTeamsDistributeDirective",
143     "ompTeamsDistributeSimdDirective",
144     "ompTeamsDistributeParallelForSimdDirective",
145     "ompTeamsDistributeParallelForDirective",
146     "ompTargetTeamsDirective",
147     "ompTargetTeamsDistributeDirective",
148     "ompTargetTeamsDistributeParallelForDirective",
149     "ompTargetTeamsDistributeParallelForSimdDirective",
150     "ompTargetTeamsDistributeSimdDirective",
151     ];
152 // dfmt on
153 
154 // dfmt off
155 immutable string[] ExpressionSeq = [
156     "unexposedExpr",
157     "declRefExpr",
158     "memberRefExpr",
159     "callExpr",
160     "objCMessageExpr",
161     "blockExpr",
162     "integerLiteral",
163     "floatingLiteral",
164     "imaginaryLiteral",
165     "stringLiteral",
166     "characterLiteral",
167     "parenExpr",
168     "unaryOperator",
169     "arraySubscriptExpr",
170     "binaryOperator",
171     "compoundAssignOperator",
172     "conditionalOperator",
173     "cStyleCastExpr",
174     "compoundLiteralExpr",
175     "initListExpr",
176     "addrLabelExpr",
177     "stmtExpr",
178     "genericSelectionExpr",
179     "gnuNullExpr",
180     "cxxStaticCastExpr",
181     "cxxDynamicCastExpr",
182     "cxxReinterpretCastExpr",
183     "cxxConstCastExpr",
184     "cxxFunctionalCastExpr",
185     "cxxTypeidExpr",
186     "cxxBoolLiteralExpr",
187     "cxxNullPtrLiteralExpr",
188     "cxxThisExpr",
189     "cxxThrowExpr",
190     "cxxNewExpr",
191     "cxxDeleteExpr",
192     "unaryExpr",
193     "objCStringLiteral",
194     "objCEncodeExpr",
195     "objCSelectorExpr",
196     "objCProtocolExpr",
197     "objCBridgedCastExpr",
198     "packExpansionExpr",
199     "sizeOfPackExpr",
200     "lambdaExpr",
201     "objCBoolLiteralExpr",
202     "objCSelfExpr",
203     "ompArraySectionExpr",
204     "objCAvailabilityCheckExpr",
205     ];
206 // dfmt on
207 
208 // dfmt off
209 immutable string[] PreprocessorSeq = [
210     "preprocessingDirective",
211     "macroDefinition",
212     "macroExpansion",
213     // Overlaps with MacroExpansion
214     //CXCursor_MacroInstantiation,
215     "inclusionDirective",
216 ];
217 // dfmt on
218 
219 // dfmt off
220 immutable string[] ReferenceSeq = [
221     "objCSuperClassRef",
222     "objCProtocolRef",
223     "objCClassRef",
224     "typeRef",
225     "cxxBaseSpecifier",
226     "templateRef",
227     "namespaceRef",
228     "memberRef",
229     "labelRef",
230     "overloadedDeclRef",
231     "variableRef",
232 ];
233 // dfmt on
234 
235 // dfmt off
236 immutable string[] StatementSeq = [
237     "unexposedStmt",
238     "labelStmt",
239     "compoundStmt",
240     "caseStmt",
241     "defaultStmt",
242     "ifStmt",
243     "switchStmt",
244     "whileStmt",
245     "doStmt",
246     "forStmt",
247     "gotoStmt",
248     "indirectGotoStmt",
249     "continueStmt",
250     "breakStmt",
251     "returnStmt",
252     // overlaps with AsmStmt
253     //CXCursor_GCCAsmStmt,
254     "asmStmt",
255     "objCAtTryStmt",
256     "objCAtCatchStmt",
257     "objCAtFinallyStmt",
258     "objCAtThrowStmt",
259     "objCAtSynchronizedStmt",
260     "objCAutoreleasePoolStmt",
261     "objCForCollectionStmt",
262     "cxxCatchStmt",
263     "cxxTryStmt",
264     "cxxForRangeStmt",
265     "sehTryStmt",
266     "sehExceptStmt",
267     "sehFinallyStmt",
268     "msAsmStmt",
269     "nullStmt",
270     "declStmt",
271     "sehLeaveStmt",
272     ];
273 // dfmt on