ASTPatternBuilder.h 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382
  1. // Copyright (c) 2008 Roberto Raggi <[email protected]>
  2. //
  3. // Permission is hereby granted, free of charge, to any person obtaining a copy
  4. // of this software and associated documentation files (the "Software"), to deal
  5. // in the Software without restriction, including without limitation the rights
  6. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. // copies of the Software, and to permit persons to whom the Software is
  8. // furnished to do so, subject to the following conditions:
  9. //
  10. // The above copyright notice and this permission notice shall be included in
  11. // all copies or substantial portions of the Software.
  12. //
  13. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. // THE SOFTWARE.
  20. //
  21. // W A R N I N G
  22. // -------------
  23. //
  24. // This file is automatically generated by "cplusplus-update-frontend".
  25. // Changes will be lost.
  26. //
  27. #ifndef CPLUSPLUS_AST_PATTERN_BUILDER_H
  28. #define CPLUSPLUS_AST_PATTERN_BUILDER_H
  29. #include "CPlusPlusForwardDeclarations.h"
  30. #include "AST.h"
  31. #include "MemoryPool.h"
  32. namespace CPlusPlus {
  33. class CPLUSPLUS_EXPORT ASTPatternBuilder
  34. {
  35. MemoryPool pool;
  36. public:
  37. ASTPatternBuilder() {}
  38. void reset() { pool.reset(); }
  39. ObjCSelectorArgumentAST *ObjCSelectorArgument()
  40. {
  41. ObjCSelectorArgumentAST *ast = new (&pool) ObjCSelectorArgumentAST;
  42. return ast;
  43. }
  44. ObjCSelectorAST *ObjCSelector(ObjCSelectorArgumentListAST *selector_argument_list = 0)
  45. {
  46. ObjCSelectorAST *ast = new (&pool) ObjCSelectorAST;
  47. ast->selector_argument_list = selector_argument_list;
  48. return ast;
  49. }
  50. SimpleSpecifierAST *SimpleSpecifier()
  51. {
  52. SimpleSpecifierAST *ast = new (&pool) SimpleSpecifierAST;
  53. return ast;
  54. }
  55. AlignmentSpecifierAST *AlignmentSpecifier(ExpressionAST *typeIdExprOrAlignmentExpr = 0)
  56. {
  57. AlignmentSpecifierAST *ast = new (&pool) AlignmentSpecifierAST;
  58. ast->typeIdExprOrAlignmentExpr = typeIdExprOrAlignmentExpr;
  59. return ast;
  60. }
  61. GnuAttributeSpecifierAST *GnuAttributeSpecifier(GnuAttributeListAST *attribute_list = 0)
  62. {
  63. GnuAttributeSpecifierAST *ast = new (&pool) GnuAttributeSpecifierAST;
  64. ast->attribute_list = attribute_list;
  65. return ast;
  66. }
  67. GnuAttributeAST *GnuAttribute(ExpressionListAST *expression_list = 0)
  68. {
  69. GnuAttributeAST *ast = new (&pool) GnuAttributeAST;
  70. ast->expression_list = expression_list;
  71. return ast;
  72. }
  73. TypeofSpecifierAST *TypeofSpecifier(ExpressionAST *expression = 0)
  74. {
  75. TypeofSpecifierAST *ast = new (&pool) TypeofSpecifierAST;
  76. ast->expression = expression;
  77. return ast;
  78. }
  79. DecltypeSpecifierAST *DecltypeSpecifier(ExpressionAST *expression = 0)
  80. {
  81. DecltypeSpecifierAST *ast = new (&pool) DecltypeSpecifierAST;
  82. ast->expression = expression;
  83. return ast;
  84. }
  85. DeclaratorAST *Declarator(SpecifierListAST *attribute_list = 0, PtrOperatorListAST *ptr_operator_list = 0, CoreDeclaratorAST *core_declarator = 0, PostfixDeclaratorListAST *postfix_declarator_list = 0, SpecifierListAST *post_attribute_list = 0, ExpressionAST *initializer = 0)
  86. {
  87. DeclaratorAST *ast = new (&pool) DeclaratorAST;
  88. ast->attribute_list = attribute_list;
  89. ast->ptr_operator_list = ptr_operator_list;
  90. ast->core_declarator = core_declarator;
  91. ast->postfix_declarator_list = postfix_declarator_list;
  92. ast->post_attribute_list = post_attribute_list;
  93. ast->initializer = initializer;
  94. return ast;
  95. }
  96. SimpleDeclarationAST *SimpleDeclaration(SpecifierListAST *decl_specifier_list = 0, DeclaratorListAST *declarator_list = 0)
  97. {
  98. SimpleDeclarationAST *ast = new (&pool) SimpleDeclarationAST;
  99. ast->decl_specifier_list = decl_specifier_list;
  100. ast->declarator_list = declarator_list;
  101. return ast;
  102. }
  103. EmptyDeclarationAST *EmptyDeclaration()
  104. {
  105. EmptyDeclarationAST *ast = new (&pool) EmptyDeclarationAST;
  106. return ast;
  107. }
  108. AccessDeclarationAST *AccessDeclaration()
  109. {
  110. AccessDeclarationAST *ast = new (&pool) AccessDeclarationAST;
  111. return ast;
  112. }
  113. QtObjectTagAST *QtObjectTag()
  114. {
  115. QtObjectTagAST *ast = new (&pool) QtObjectTagAST;
  116. return ast;
  117. }
  118. QtPrivateSlotAST *QtPrivateSlot(SpecifierListAST *type_specifier_list = 0, DeclaratorAST *declarator = 0)
  119. {
  120. QtPrivateSlotAST *ast = new (&pool) QtPrivateSlotAST;
  121. ast->type_specifier_list = type_specifier_list;
  122. ast->declarator = declarator;
  123. return ast;
  124. }
  125. QtPropertyDeclarationItemAST *QtPropertyDeclarationItem(ExpressionAST *expression = 0)
  126. {
  127. QtPropertyDeclarationItemAST *ast = new (&pool) QtPropertyDeclarationItemAST;
  128. ast->expression = expression;
  129. return ast;
  130. }
  131. QtPropertyDeclarationAST *QtPropertyDeclaration(ExpressionAST *expression = 0, ExpressionAST *type_id = 0, NameAST *property_name = 0, QtPropertyDeclarationItemListAST *property_declaration_item_list = 0)
  132. {
  133. QtPropertyDeclarationAST *ast = new (&pool) QtPropertyDeclarationAST;
  134. ast->expression = expression;
  135. ast->type_id = type_id;
  136. ast->property_name = property_name;
  137. ast->property_declaration_item_list = property_declaration_item_list;
  138. return ast;
  139. }
  140. QtEnumDeclarationAST *QtEnumDeclaration(NameListAST *enumerator_list = 0)
  141. {
  142. QtEnumDeclarationAST *ast = new (&pool) QtEnumDeclarationAST;
  143. ast->enumerator_list = enumerator_list;
  144. return ast;
  145. }
  146. QtFlagsDeclarationAST *QtFlagsDeclaration(NameListAST *flag_enums_list = 0)
  147. {
  148. QtFlagsDeclarationAST *ast = new (&pool) QtFlagsDeclarationAST;
  149. ast->flag_enums_list = flag_enums_list;
  150. return ast;
  151. }
  152. QtInterfaceNameAST *QtInterfaceName(NameAST *interface_name = 0, NameListAST *constraint_list = 0)
  153. {
  154. QtInterfaceNameAST *ast = new (&pool) QtInterfaceNameAST;
  155. ast->interface_name = interface_name;
  156. ast->constraint_list = constraint_list;
  157. return ast;
  158. }
  159. QtInterfacesDeclarationAST *QtInterfacesDeclaration(QtInterfaceNameListAST *interface_name_list = 0)
  160. {
  161. QtInterfacesDeclarationAST *ast = new (&pool) QtInterfacesDeclarationAST;
  162. ast->interface_name_list = interface_name_list;
  163. return ast;
  164. }
  165. AsmDefinitionAST *AsmDefinition()
  166. {
  167. AsmDefinitionAST *ast = new (&pool) AsmDefinitionAST;
  168. return ast;
  169. }
  170. BaseSpecifierAST *BaseSpecifier(NameAST *name = 0)
  171. {
  172. BaseSpecifierAST *ast = new (&pool) BaseSpecifierAST;
  173. ast->name = name;
  174. return ast;
  175. }
  176. IdExpressionAST *IdExpression(NameAST *name = 0)
  177. {
  178. IdExpressionAST *ast = new (&pool) IdExpressionAST;
  179. ast->name = name;
  180. return ast;
  181. }
  182. CompoundExpressionAST *CompoundExpression(CompoundStatementAST *statement = 0)
  183. {
  184. CompoundExpressionAST *ast = new (&pool) CompoundExpressionAST;
  185. ast->statement = statement;
  186. return ast;
  187. }
  188. CompoundLiteralAST *CompoundLiteral(ExpressionAST *type_id = 0, ExpressionAST *initializer = 0)
  189. {
  190. CompoundLiteralAST *ast = new (&pool) CompoundLiteralAST;
  191. ast->type_id = type_id;
  192. ast->initializer = initializer;
  193. return ast;
  194. }
  195. QtMethodAST *QtMethod(DeclaratorAST *declarator = 0)
  196. {
  197. QtMethodAST *ast = new (&pool) QtMethodAST;
  198. ast->declarator = declarator;
  199. return ast;
  200. }
  201. QtMemberDeclarationAST *QtMemberDeclaration(ExpressionAST *type_id = 0)
  202. {
  203. QtMemberDeclarationAST *ast = new (&pool) QtMemberDeclarationAST;
  204. ast->type_id = type_id;
  205. return ast;
  206. }
  207. BinaryExpressionAST *BinaryExpression(ExpressionAST *left_expression = 0, ExpressionAST *right_expression = 0)
  208. {
  209. BinaryExpressionAST *ast = new (&pool) BinaryExpressionAST;
  210. ast->left_expression = left_expression;
  211. ast->right_expression = right_expression;
  212. return ast;
  213. }
  214. CastExpressionAST *CastExpression(ExpressionAST *type_id = 0, ExpressionAST *expression = 0)
  215. {
  216. CastExpressionAST *ast = new (&pool) CastExpressionAST;
  217. ast->type_id = type_id;
  218. ast->expression = expression;
  219. return ast;
  220. }
  221. ClassSpecifierAST *ClassSpecifier(SpecifierListAST *attribute_list = 0, NameAST *name = 0, BaseSpecifierListAST *base_clause_list = 0, DeclarationListAST *member_specifier_list = 0)
  222. {
  223. ClassSpecifierAST *ast = new (&pool) ClassSpecifierAST;
  224. ast->attribute_list = attribute_list;
  225. ast->name = name;
  226. ast->base_clause_list = base_clause_list;
  227. ast->member_specifier_list = member_specifier_list;
  228. return ast;
  229. }
  230. CaseStatementAST *CaseStatement(ExpressionAST *expression = 0, StatementAST *statement = 0)
  231. {
  232. CaseStatementAST *ast = new (&pool) CaseStatementAST;
  233. ast->expression = expression;
  234. ast->statement = statement;
  235. return ast;
  236. }
  237. CompoundStatementAST *CompoundStatement(StatementListAST *statement_list = 0)
  238. {
  239. CompoundStatementAST *ast = new (&pool) CompoundStatementAST;
  240. ast->statement_list = statement_list;
  241. return ast;
  242. }
  243. ConditionAST *Condition(SpecifierListAST *type_specifier_list = 0, DeclaratorAST *declarator = 0)
  244. {
  245. ConditionAST *ast = new (&pool) ConditionAST;
  246. ast->type_specifier_list = type_specifier_list;
  247. ast->declarator = declarator;
  248. return ast;
  249. }
  250. ConditionalExpressionAST *ConditionalExpression(ExpressionAST *condition = 0, ExpressionAST *left_expression = 0, ExpressionAST *right_expression = 0)
  251. {
  252. ConditionalExpressionAST *ast = new (&pool) ConditionalExpressionAST;
  253. ast->condition = condition;
  254. ast->left_expression = left_expression;
  255. ast->right_expression = right_expression;
  256. return ast;
  257. }
  258. CppCastExpressionAST *CppCastExpression(ExpressionAST *type_id = 0, ExpressionAST *expression = 0)
  259. {
  260. CppCastExpressionAST *ast = new (&pool) CppCastExpressionAST;
  261. ast->type_id = type_id;
  262. ast->expression = expression;
  263. return ast;
  264. }
  265. CtorInitializerAST *CtorInitializer(MemInitializerListAST *member_initializer_list = 0)
  266. {
  267. CtorInitializerAST *ast = new (&pool) CtorInitializerAST;
  268. ast->member_initializer_list = member_initializer_list;
  269. return ast;
  270. }
  271. DeclarationStatementAST *DeclarationStatement(DeclarationAST *declaration = 0)
  272. {
  273. DeclarationStatementAST *ast = new (&pool) DeclarationStatementAST;
  274. ast->declaration = declaration;
  275. return ast;
  276. }
  277. DeclaratorIdAST *DeclaratorId(NameAST *name = 0)
  278. {
  279. DeclaratorIdAST *ast = new (&pool) DeclaratorIdAST;
  280. ast->name = name;
  281. return ast;
  282. }
  283. NestedDeclaratorAST *NestedDeclarator(DeclaratorAST *declarator = 0)
  284. {
  285. NestedDeclaratorAST *ast = new (&pool) NestedDeclaratorAST;
  286. ast->declarator = declarator;
  287. return ast;
  288. }
  289. FunctionDeclaratorAST *FunctionDeclarator(ParameterDeclarationClauseAST *parameter_declaration_clause = 0, SpecifierListAST *cv_qualifier_list = 0, ExceptionSpecificationAST *exception_specification = 0, TrailingReturnTypeAST *trailing_return_type = 0, ExpressionAST *as_cpp_initializer = 0)
  290. {
  291. FunctionDeclaratorAST *ast = new (&pool) FunctionDeclaratorAST;
  292. ast->parameter_declaration_clause = parameter_declaration_clause;
  293. ast->cv_qualifier_list = cv_qualifier_list;
  294. ast->exception_specification = exception_specification;
  295. ast->trailing_return_type = trailing_return_type;
  296. ast->as_cpp_initializer = as_cpp_initializer;
  297. return ast;
  298. }
  299. ArrayDeclaratorAST *ArrayDeclarator(ExpressionAST *expression = 0)
  300. {
  301. ArrayDeclaratorAST *ast = new (&pool) ArrayDeclaratorAST;
  302. ast->expression = expression;
  303. return ast;
  304. }
  305. DeleteExpressionAST *DeleteExpression(ExpressionAST *expression = 0)
  306. {
  307. DeleteExpressionAST *ast = new (&pool) DeleteExpressionAST;
  308. ast->expression = expression;
  309. return ast;
  310. }
  311. DoStatementAST *DoStatement(StatementAST *statement = 0, ExpressionAST *expression = 0)
  312. {
  313. DoStatementAST *ast = new (&pool) DoStatementAST;
  314. ast->statement = statement;
  315. ast->expression = expression;
  316. return ast;
  317. }
  318. NamedTypeSpecifierAST *NamedTypeSpecifier(NameAST *name = 0)
  319. {
  320. NamedTypeSpecifierAST *ast = new (&pool) NamedTypeSpecifierAST;
  321. ast->name = name;
  322. return ast;
  323. }
  324. ElaboratedTypeSpecifierAST *ElaboratedTypeSpecifier(SpecifierListAST *attribute_list = 0, NameAST *name = 0)
  325. {
  326. ElaboratedTypeSpecifierAST *ast = new (&pool) ElaboratedTypeSpecifierAST;
  327. ast->attribute_list = attribute_list;
  328. ast->name = name;
  329. return ast;
  330. }
  331. EnumSpecifierAST *EnumSpecifier(NameAST *name = 0, SpecifierListAST *type_specifier_list = 0, EnumeratorListAST *enumerator_list = 0)
  332. {
  333. EnumSpecifierAST *ast = new (&pool) EnumSpecifierAST;
  334. ast->name = name;
  335. ast->type_specifier_list = type_specifier_list;
  336. ast->enumerator_list = enumerator_list;
  337. return ast;
  338. }
  339. EnumeratorAST *Enumerator(ExpressionAST *expression = 0)
  340. {
  341. EnumeratorAST *ast = new (&pool) EnumeratorAST;
  342. ast->expression = expression;
  343. return ast;
  344. }
  345. ExceptionDeclarationAST *ExceptionDeclaration(SpecifierListAST *type_specifier_list = 0, DeclaratorAST *declarator = 0)
  346. {
  347. ExceptionDeclarationAST *ast = new (&pool) ExceptionDeclarationAST;
  348. ast->type_specifier_list = type_specifier_list;
  349. ast->declarator = declarator;
  350. return ast;
  351. }
  352. DynamicExceptionSpecificationAST *DynamicExceptionSpecification(ExpressionListAST *type_id_list = 0)
  353. {
  354. DynamicExceptionSpecificationAST *ast = new (&pool) DynamicExceptionSpecificationAST;
  355. ast->type_id_list = type_id_list;
  356. return ast;
  357. }
  358. NoExceptSpecificationAST *NoExceptSpecification(ExpressionAST *expression = 0)
  359. {
  360. NoExceptSpecificationAST *ast = new (&pool) NoExceptSpecificationAST;
  361. ast->expression = expression;
  362. return ast;
  363. }
  364. ExpressionOrDeclarationStatementAST *ExpressionOrDeclarationStatement(ExpressionStatementAST *expression = 0, DeclarationStatementAST *declaration = 0)
  365. {
  366. ExpressionOrDeclarationStatementAST *ast = new (&pool) ExpressionOrDeclarationStatementAST;
  367. ast->expression = expression;
  368. ast->declaration = declaration;
  369. return ast;
  370. }
  371. ExpressionStatementAST *ExpressionStatement(ExpressionAST *expression = 0)
  372. {
  373. ExpressionStatementAST *ast = new (&pool) ExpressionStatementAST;
  374. ast->expression = expression;
  375. return ast;
  376. }
  377. FunctionDefinitionAST *FunctionDefinition(SpecifierListAST *decl_specifier_list = 0, DeclaratorAST *declarator = 0, CtorInitializerAST *ctor_initializer = 0, StatementAST *function_body = 0)
  378. {
  379. FunctionDefinitionAST *ast = new (&pool) FunctionDefinitionAST;
  380. ast->decl_specifier_list = decl_specifier_list;
  381. ast->declarator = declarator;
  382. ast->ctor_initializer = ctor_initializer;
  383. ast->function_body = function_body;
  384. return ast;
  385. }
  386. ForeachStatementAST *ForeachStatement(SpecifierListAST *type_specifier_list = 0, DeclaratorAST *declarator = 0, ExpressionAST *initializer = 0, ExpressionAST *expression = 0, StatementAST *statement = 0)
  387. {
  388. ForeachStatementAST *ast = new (&pool) ForeachStatementAST;
  389. ast->type_specifier_list = type_specifier_list;
  390. ast->declarator = declarator;
  391. ast->initializer = initializer;
  392. ast->expression = expression;
  393. ast->statement = statement;
  394. return ast;
  395. }
  396. RangeBasedForStatementAST *RangeBasedForStatement(SpecifierListAST *type_specifier_list = 0, DeclaratorAST *declarator = 0, ExpressionAST *expression = 0, StatementAST *statement = 0)
  397. {
  398. RangeBasedForStatementAST *ast = new (&pool) RangeBasedForStatementAST;
  399. ast->type_specifier_list = type_specifier_list;
  400. ast->declarator = declarator;
  401. ast->expression = expression;
  402. ast->statement = statement;
  403. return ast;
  404. }
  405. ForStatementAST *ForStatement(StatementAST *initializer = 0, ExpressionAST *condition = 0, ExpressionAST *expression = 0, StatementAST *statement = 0)
  406. {
  407. ForStatementAST *ast = new (&pool) ForStatementAST;
  408. ast->initializer = initializer;
  409. ast->condition = condition;
  410. ast->expression = expression;
  411. ast->statement = statement;
  412. return ast;
  413. }
  414. IfStatementAST *IfStatement(ExpressionAST *condition = 0, StatementAST *statement = 0, StatementAST *else_statement = 0)
  415. {
  416. IfStatementAST *ast = new (&pool) IfStatementAST;
  417. ast->condition = condition;
  418. ast->statement = statement;
  419. ast->else_statement = else_statement;
  420. return ast;
  421. }
  422. ArrayInitializerAST *ArrayInitializer(ExpressionListAST *expression_list = 0)
  423. {
  424. ArrayInitializerAST *ast = new (&pool) ArrayInitializerAST;
  425. ast->expression_list = expression_list;
  426. return ast;
  427. }
  428. LabeledStatementAST *LabeledStatement(StatementAST *statement = 0)
  429. {
  430. LabeledStatementAST *ast = new (&pool) LabeledStatementAST;
  431. ast->statement = statement;
  432. return ast;
  433. }
  434. LinkageBodyAST *LinkageBody(DeclarationListAST *declaration_list = 0)
  435. {
  436. LinkageBodyAST *ast = new (&pool) LinkageBodyAST;
  437. ast->declaration_list = declaration_list;
  438. return ast;
  439. }
  440. LinkageSpecificationAST *LinkageSpecification(DeclarationAST *declaration = 0)
  441. {
  442. LinkageSpecificationAST *ast = new (&pool) LinkageSpecificationAST;
  443. ast->declaration = declaration;
  444. return ast;
  445. }
  446. MemInitializerAST *MemInitializer(NameAST *name = 0, ExpressionAST *expression = 0)
  447. {
  448. MemInitializerAST *ast = new (&pool) MemInitializerAST;
  449. ast->name = name;
  450. ast->expression = expression;
  451. return ast;
  452. }
  453. NestedNameSpecifierAST *NestedNameSpecifier(NameAST *class_or_namespace_name = 0)
  454. {
  455. NestedNameSpecifierAST *ast = new (&pool) NestedNameSpecifierAST;
  456. ast->class_or_namespace_name = class_or_namespace_name;
  457. return ast;
  458. }
  459. QualifiedNameAST *QualifiedName(NestedNameSpecifierListAST *nested_name_specifier_list = 0, NameAST *unqualified_name = 0)
  460. {
  461. QualifiedNameAST *ast = new (&pool) QualifiedNameAST;
  462. ast->nested_name_specifier_list = nested_name_specifier_list;
  463. ast->unqualified_name = unqualified_name;
  464. return ast;
  465. }
  466. OperatorFunctionIdAST *OperatorFunctionId(OperatorAST *op = 0)
  467. {
  468. OperatorFunctionIdAST *ast = new (&pool) OperatorFunctionIdAST;
  469. ast->op = op;
  470. return ast;
  471. }
  472. ConversionFunctionIdAST *ConversionFunctionId(SpecifierListAST *type_specifier_list = 0, PtrOperatorListAST *ptr_operator_list = 0)
  473. {
  474. ConversionFunctionIdAST *ast = new (&pool) ConversionFunctionIdAST;
  475. ast->type_specifier_list = type_specifier_list;
  476. ast->ptr_operator_list = ptr_operator_list;
  477. return ast;
  478. }
  479. AnonymousNameAST *AnonymousName()
  480. {
  481. AnonymousNameAST *ast = new (&pool) AnonymousNameAST;
  482. return ast;
  483. }
  484. SimpleNameAST *SimpleName()
  485. {
  486. SimpleNameAST *ast = new (&pool) SimpleNameAST;
  487. return ast;
  488. }
  489. DestructorNameAST *DestructorName(NameAST *unqualified_name = 0)
  490. {
  491. DestructorNameAST *ast = new (&pool) DestructorNameAST;
  492. ast->unqualified_name = unqualified_name;
  493. return ast;
  494. }
  495. TemplateIdAST *TemplateId(ExpressionListAST *template_argument_list = 0)
  496. {
  497. TemplateIdAST *ast = new (&pool) TemplateIdAST;
  498. ast->template_argument_list = template_argument_list;
  499. return ast;
  500. }
  501. NamespaceAST *Namespace(SpecifierListAST *attribute_list = 0, DeclarationAST *linkage_body = 0)
  502. {
  503. NamespaceAST *ast = new (&pool) NamespaceAST;
  504. ast->attribute_list = attribute_list;
  505. ast->linkage_body = linkage_body;
  506. return ast;
  507. }
  508. NamespaceAliasDefinitionAST *NamespaceAliasDefinition(NameAST *name = 0)
  509. {
  510. NamespaceAliasDefinitionAST *ast = new (&pool) NamespaceAliasDefinitionAST;
  511. ast->name = name;
  512. return ast;
  513. }
  514. AliasDeclarationAST *AliasDeclaration(NameAST *name = 0, TypeIdAST *typeId = 0)
  515. {
  516. AliasDeclarationAST *ast = new (&pool) AliasDeclarationAST;
  517. ast->name = name;
  518. ast->typeId = typeId;
  519. return ast;
  520. }
  521. ExpressionListParenAST *ExpressionListParen(ExpressionListAST *expression_list = 0)
  522. {
  523. ExpressionListParenAST *ast = new (&pool) ExpressionListParenAST;
  524. ast->expression_list = expression_list;
  525. return ast;
  526. }
  527. NewArrayDeclaratorAST *NewArrayDeclarator(ExpressionAST *expression = 0)
  528. {
  529. NewArrayDeclaratorAST *ast = new (&pool) NewArrayDeclaratorAST;
  530. ast->expression = expression;
  531. return ast;
  532. }
  533. NewExpressionAST *NewExpression(ExpressionListParenAST *new_placement = 0, ExpressionAST *type_id = 0, NewTypeIdAST *new_type_id = 0, ExpressionAST *new_initializer = 0)
  534. {
  535. NewExpressionAST *ast = new (&pool) NewExpressionAST;
  536. ast->new_placement = new_placement;
  537. ast->type_id = type_id;
  538. ast->new_type_id = new_type_id;
  539. ast->new_initializer = new_initializer;
  540. return ast;
  541. }
  542. NewTypeIdAST *NewTypeId(SpecifierListAST *type_specifier_list = 0, PtrOperatorListAST *ptr_operator_list = 0, NewArrayDeclaratorListAST *new_array_declarator_list = 0)
  543. {
  544. NewTypeIdAST *ast = new (&pool) NewTypeIdAST;
  545. ast->type_specifier_list = type_specifier_list;
  546. ast->ptr_operator_list = ptr_operator_list;
  547. ast->new_array_declarator_list = new_array_declarator_list;
  548. return ast;
  549. }
  550. OperatorAST *Operator()
  551. {
  552. OperatorAST *ast = new (&pool) OperatorAST;
  553. return ast;
  554. }
  555. ParameterDeclarationAST *ParameterDeclaration(SpecifierListAST *type_specifier_list = 0, DeclaratorAST *declarator = 0, ExpressionAST *expression = 0)
  556. {
  557. ParameterDeclarationAST *ast = new (&pool) ParameterDeclarationAST;
  558. ast->type_specifier_list = type_specifier_list;
  559. ast->declarator = declarator;
  560. ast->expression = expression;
  561. return ast;
  562. }
  563. ParameterDeclarationClauseAST *ParameterDeclarationClause(ParameterDeclarationListAST *parameter_declaration_list = 0)
  564. {
  565. ParameterDeclarationClauseAST *ast = new (&pool) ParameterDeclarationClauseAST;
  566. ast->parameter_declaration_list = parameter_declaration_list;
  567. return ast;
  568. }
  569. CallAST *Call(ExpressionAST *base_expression = 0, ExpressionListAST *expression_list = 0)
  570. {
  571. CallAST *ast = new (&pool) CallAST;
  572. ast->base_expression = base_expression;
  573. ast->expression_list = expression_list;
  574. return ast;
  575. }
  576. ArrayAccessAST *ArrayAccess(ExpressionAST *base_expression = 0, ExpressionAST *expression = 0)
  577. {
  578. ArrayAccessAST *ast = new (&pool) ArrayAccessAST;
  579. ast->base_expression = base_expression;
  580. ast->expression = expression;
  581. return ast;
  582. }
  583. PostIncrDecrAST *PostIncrDecr(ExpressionAST *base_expression = 0)
  584. {
  585. PostIncrDecrAST *ast = new (&pool) PostIncrDecrAST;
  586. ast->base_expression = base_expression;
  587. return ast;
  588. }
  589. MemberAccessAST *MemberAccess(ExpressionAST *base_expression = 0, NameAST *member_name = 0)
  590. {
  591. MemberAccessAST *ast = new (&pool) MemberAccessAST;
  592. ast->base_expression = base_expression;
  593. ast->member_name = member_name;
  594. return ast;
  595. }
  596. TypeidExpressionAST *TypeidExpression(ExpressionAST *expression = 0)
  597. {
  598. TypeidExpressionAST *ast = new (&pool) TypeidExpressionAST;
  599. ast->expression = expression;
  600. return ast;
  601. }
  602. TypenameCallExpressionAST *TypenameCallExpression(NameAST *name = 0, ExpressionAST *expression = 0)
  603. {
  604. TypenameCallExpressionAST *ast = new (&pool) TypenameCallExpressionAST;
  605. ast->name = name;
  606. ast->expression = expression;
  607. return ast;
  608. }
  609. TypeConstructorCallAST *TypeConstructorCall(SpecifierListAST *type_specifier_list = 0, ExpressionAST *expression = 0)
  610. {
  611. TypeConstructorCallAST *ast = new (&pool) TypeConstructorCallAST;
  612. ast->type_specifier_list = type_specifier_list;
  613. ast->expression = expression;
  614. return ast;
  615. }
  616. PointerToMemberAST *PointerToMember(NestedNameSpecifierListAST *nested_name_specifier_list = 0, SpecifierListAST *cv_qualifier_list = 0)
  617. {
  618. PointerToMemberAST *ast = new (&pool) PointerToMemberAST;
  619. ast->nested_name_specifier_list = nested_name_specifier_list;
  620. ast->cv_qualifier_list = cv_qualifier_list;
  621. return ast;
  622. }
  623. PointerAST *Pointer(SpecifierListAST *cv_qualifier_list = 0)
  624. {
  625. PointerAST *ast = new (&pool) PointerAST;
  626. ast->cv_qualifier_list = cv_qualifier_list;
  627. return ast;
  628. }
  629. ReferenceAST *Reference()
  630. {
  631. ReferenceAST *ast = new (&pool) ReferenceAST;
  632. return ast;
  633. }
  634. BreakStatementAST *BreakStatement()
  635. {
  636. BreakStatementAST *ast = new (&pool) BreakStatementAST;
  637. return ast;
  638. }
  639. ContinueStatementAST *ContinueStatement()
  640. {
  641. ContinueStatementAST *ast = new (&pool) ContinueStatementAST;
  642. return ast;
  643. }
  644. GotoStatementAST *GotoStatement()
  645. {
  646. GotoStatementAST *ast = new (&pool) GotoStatementAST;
  647. return ast;
  648. }
  649. ReturnStatementAST *ReturnStatement(ExpressionAST *expression = 0)
  650. {
  651. ReturnStatementAST *ast = new (&pool) ReturnStatementAST;
  652. ast->expression = expression;
  653. return ast;
  654. }
  655. SizeofExpressionAST *SizeofExpression(ExpressionAST *expression = 0)
  656. {
  657. SizeofExpressionAST *ast = new (&pool) SizeofExpressionAST;
  658. ast->expression = expression;
  659. return ast;
  660. }
  661. AlignofExpressionAST *AlignofExpression(TypeIdAST *typeId = 0)
  662. {
  663. AlignofExpressionAST *ast = new (&pool) AlignofExpressionAST;
  664. ast->typeId = typeId;
  665. return ast;
  666. }
  667. PointerLiteralAST *PointerLiteral()
  668. {
  669. PointerLiteralAST *ast = new (&pool) PointerLiteralAST;
  670. return ast;
  671. }
  672. NumericLiteralAST *NumericLiteral()
  673. {
  674. NumericLiteralAST *ast = new (&pool) NumericLiteralAST;
  675. return ast;
  676. }
  677. BoolLiteralAST *BoolLiteral()
  678. {
  679. BoolLiteralAST *ast = new (&pool) BoolLiteralAST;
  680. return ast;
  681. }
  682. ThisExpressionAST *ThisExpression()
  683. {
  684. ThisExpressionAST *ast = new (&pool) ThisExpressionAST;
  685. return ast;
  686. }
  687. NestedExpressionAST *NestedExpression(ExpressionAST *expression = 0)
  688. {
  689. NestedExpressionAST *ast = new (&pool) NestedExpressionAST;
  690. ast->expression = expression;
  691. return ast;
  692. }
  693. StaticAssertDeclarationAST *StaticAssertDeclaration(ExpressionAST *expression = 0, ExpressionAST *string_literal = 0)
  694. {
  695. StaticAssertDeclarationAST *ast = new (&pool) StaticAssertDeclarationAST;
  696. ast->expression = expression;
  697. ast->string_literal = string_literal;
  698. return ast;
  699. }
  700. StringLiteralAST *StringLiteral(StringLiteralAST *next = 0)
  701. {
  702. StringLiteralAST *ast = new (&pool) StringLiteralAST;
  703. ast->next = next;
  704. return ast;
  705. }
  706. SwitchStatementAST *SwitchStatement(ExpressionAST *condition = 0, StatementAST *statement = 0)
  707. {
  708. SwitchStatementAST *ast = new (&pool) SwitchStatementAST;
  709. ast->condition = condition;
  710. ast->statement = statement;
  711. return ast;
  712. }
  713. TemplateDeclarationAST *TemplateDeclaration(DeclarationListAST *template_parameter_list = 0, DeclarationAST *declaration = 0)
  714. {
  715. TemplateDeclarationAST *ast = new (&pool) TemplateDeclarationAST;
  716. ast->template_parameter_list = template_parameter_list;
  717. ast->declaration = declaration;
  718. return ast;
  719. }
  720. ThrowExpressionAST *ThrowExpression(ExpressionAST *expression = 0)
  721. {
  722. ThrowExpressionAST *ast = new (&pool) ThrowExpressionAST;
  723. ast->expression = expression;
  724. return ast;
  725. }
  726. TranslationUnitAST *TranslationUnit(DeclarationListAST *declaration_list = 0)
  727. {
  728. TranslationUnitAST *ast = new (&pool) TranslationUnitAST;
  729. ast->declaration_list = declaration_list;
  730. return ast;
  731. }
  732. TryBlockStatementAST *TryBlockStatement(StatementAST *statement = 0, CatchClauseListAST *catch_clause_list = 0)
  733. {
  734. TryBlockStatementAST *ast = new (&pool) TryBlockStatementAST;
  735. ast->statement = statement;
  736. ast->catch_clause_list = catch_clause_list;
  737. return ast;
  738. }
  739. CatchClauseAST *CatchClause(ExceptionDeclarationAST *exception_declaration = 0, StatementAST *statement = 0)
  740. {
  741. CatchClauseAST *ast = new (&pool) CatchClauseAST;
  742. ast->exception_declaration = exception_declaration;
  743. ast->statement = statement;
  744. return ast;
  745. }
  746. TypeIdAST *TypeId(SpecifierListAST *type_specifier_list = 0, DeclaratorAST *declarator = 0)
  747. {
  748. TypeIdAST *ast = new (&pool) TypeIdAST;
  749. ast->type_specifier_list = type_specifier_list;
  750. ast->declarator = declarator;
  751. return ast;
  752. }
  753. TypenameTypeParameterAST *TypenameTypeParameter(NameAST *name = 0, ExpressionAST *type_id = 0)
  754. {
  755. TypenameTypeParameterAST *ast = new (&pool) TypenameTypeParameterAST;
  756. ast->name = name;
  757. ast->type_id = type_id;
  758. return ast;
  759. }
  760. TemplateTypeParameterAST *TemplateTypeParameter(DeclarationListAST *template_parameter_list = 0, NameAST *name = 0, ExpressionAST *type_id = 0)
  761. {
  762. TemplateTypeParameterAST *ast = new (&pool) TemplateTypeParameterAST;
  763. ast->template_parameter_list = template_parameter_list;
  764. ast->name = name;
  765. ast->type_id = type_id;
  766. return ast;
  767. }
  768. UnaryExpressionAST *UnaryExpression(ExpressionAST *expression = 0)
  769. {
  770. UnaryExpressionAST *ast = new (&pool) UnaryExpressionAST;
  771. ast->expression = expression;
  772. return ast;
  773. }
  774. UsingAST *Using(NameAST *name = 0)
  775. {
  776. UsingAST *ast = new (&pool) UsingAST;
  777. ast->name = name;
  778. return ast;
  779. }
  780. UsingDirectiveAST *UsingDirective(NameAST *name = 0)
  781. {
  782. UsingDirectiveAST *ast = new (&pool) UsingDirectiveAST;
  783. ast->name = name;
  784. return ast;
  785. }
  786. WhileStatementAST *WhileStatement(ExpressionAST *condition = 0, StatementAST *statement = 0)
  787. {
  788. WhileStatementAST *ast = new (&pool) WhileStatementAST;
  789. ast->condition = condition;
  790. ast->statement = statement;
  791. return ast;
  792. }
  793. ObjCClassForwardDeclarationAST *ObjCClassForwardDeclaration(SpecifierListAST *attribute_list = 0, NameListAST *identifier_list = 0)
  794. {
  795. ObjCClassForwardDeclarationAST *ast = new (&pool) ObjCClassForwardDeclarationAST;
  796. ast->attribute_list = attribute_list;
  797. ast->identifier_list = identifier_list;
  798. return ast;
  799. }
  800. ObjCClassDeclarationAST *ObjCClassDeclaration(SpecifierListAST *attribute_list = 0, NameAST *class_name = 0, NameAST *category_name = 0, NameAST *superclass = 0, ObjCProtocolRefsAST *protocol_refs = 0, ObjCInstanceVariablesDeclarationAST *inst_vars_decl = 0, DeclarationListAST *member_declaration_list = 0)
  801. {
  802. ObjCClassDeclarationAST *ast = new (&pool) ObjCClassDeclarationAST;
  803. ast->attribute_list = attribute_list;
  804. ast->class_name = class_name;
  805. ast->category_name = category_name;
  806. ast->superclass = superclass;
  807. ast->protocol_refs = protocol_refs;
  808. ast->inst_vars_decl = inst_vars_decl;
  809. ast->member_declaration_list = member_declaration_list;
  810. return ast;
  811. }
  812. ObjCProtocolForwardDeclarationAST *ObjCProtocolForwardDeclaration(SpecifierListAST *attribute_list = 0, NameListAST *identifier_list = 0)
  813. {
  814. ObjCProtocolForwardDeclarationAST *ast = new (&pool) ObjCProtocolForwardDeclarationAST;
  815. ast->attribute_list = attribute_list;
  816. ast->identifier_list = identifier_list;
  817. return ast;
  818. }
  819. ObjCProtocolDeclarationAST *ObjCProtocolDeclaration(SpecifierListAST *attribute_list = 0, NameAST *name = 0, ObjCProtocolRefsAST *protocol_refs = 0, DeclarationListAST *member_declaration_list = 0)
  820. {
  821. ObjCProtocolDeclarationAST *ast = new (&pool) ObjCProtocolDeclarationAST;
  822. ast->attribute_list = attribute_list;
  823. ast->name = name;
  824. ast->protocol_refs = protocol_refs;
  825. ast->member_declaration_list = member_declaration_list;
  826. return ast;
  827. }
  828. ObjCProtocolRefsAST *ObjCProtocolRefs(NameListAST *identifier_list = 0)
  829. {
  830. ObjCProtocolRefsAST *ast = new (&pool) ObjCProtocolRefsAST;
  831. ast->identifier_list = identifier_list;
  832. return ast;
  833. }
  834. ObjCMessageArgumentAST *ObjCMessageArgument(ExpressionAST *parameter_value_expression = 0)
  835. {
  836. ObjCMessageArgumentAST *ast = new (&pool) ObjCMessageArgumentAST;
  837. ast->parameter_value_expression = parameter_value_expression;
  838. return ast;
  839. }
  840. ObjCMessageExpressionAST *ObjCMessageExpression(ExpressionAST *receiver_expression = 0, ObjCSelectorAST *selector = 0, ObjCMessageArgumentListAST *argument_list = 0)
  841. {
  842. ObjCMessageExpressionAST *ast = new (&pool) ObjCMessageExpressionAST;
  843. ast->receiver_expression = receiver_expression;
  844. ast->selector = selector;
  845. ast->argument_list = argument_list;
  846. return ast;
  847. }
  848. ObjCProtocolExpressionAST *ObjCProtocolExpression()
  849. {
  850. ObjCProtocolExpressionAST *ast = new (&pool) ObjCProtocolExpressionAST;
  851. return ast;
  852. }
  853. ObjCTypeNameAST *ObjCTypeName(ExpressionAST *type_id = 0)
  854. {
  855. ObjCTypeNameAST *ast = new (&pool) ObjCTypeNameAST;
  856. ast->type_id = type_id;
  857. return ast;
  858. }
  859. ObjCEncodeExpressionAST *ObjCEncodeExpression(ObjCTypeNameAST *type_name = 0)
  860. {
  861. ObjCEncodeExpressionAST *ast = new (&pool) ObjCEncodeExpressionAST;
  862. ast->type_name = type_name;
  863. return ast;
  864. }
  865. ObjCSelectorExpressionAST *ObjCSelectorExpression(ObjCSelectorAST *selector = 0)
  866. {
  867. ObjCSelectorExpressionAST *ast = new (&pool) ObjCSelectorExpressionAST;
  868. ast->selector = selector;
  869. return ast;
  870. }
  871. ObjCInstanceVariablesDeclarationAST *ObjCInstanceVariablesDeclaration(DeclarationListAST *instance_variable_list = 0)
  872. {
  873. ObjCInstanceVariablesDeclarationAST *ast = new (&pool) ObjCInstanceVariablesDeclarationAST;
  874. ast->instance_variable_list = instance_variable_list;
  875. return ast;
  876. }
  877. ObjCVisibilityDeclarationAST *ObjCVisibilityDeclaration()
  878. {
  879. ObjCVisibilityDeclarationAST *ast = new (&pool) ObjCVisibilityDeclarationAST;
  880. return ast;
  881. }
  882. ObjCPropertyAttributeAST *ObjCPropertyAttribute(ObjCSelectorAST *method_selector = 0)
  883. {
  884. ObjCPropertyAttributeAST *ast = new (&pool) ObjCPropertyAttributeAST;
  885. ast->method_selector = method_selector;
  886. return ast;
  887. }
  888. ObjCPropertyDeclarationAST *ObjCPropertyDeclaration(SpecifierListAST *attribute_list = 0, ObjCPropertyAttributeListAST *property_attribute_list = 0, DeclarationAST *simple_declaration = 0)
  889. {
  890. ObjCPropertyDeclarationAST *ast = new (&pool) ObjCPropertyDeclarationAST;
  891. ast->attribute_list = attribute_list;
  892. ast->property_attribute_list = property_attribute_list;
  893. ast->simple_declaration = simple_declaration;
  894. return ast;
  895. }
  896. ObjCMessageArgumentDeclarationAST *ObjCMessageArgumentDeclaration(ObjCTypeNameAST *type_name = 0, SpecifierListAST *attribute_list = 0, NameAST *param_name = 0)
  897. {
  898. ObjCMessageArgumentDeclarationAST *ast = new (&pool) ObjCMessageArgumentDeclarationAST;
  899. ast->type_name = type_name;
  900. ast->attribute_list = attribute_list;
  901. ast->param_name = param_name;
  902. return ast;
  903. }
  904. ObjCMethodPrototypeAST *ObjCMethodPrototype(ObjCTypeNameAST *type_name = 0, ObjCSelectorAST *selector = 0, ObjCMessageArgumentDeclarationListAST *argument_list = 0, SpecifierListAST *attribute_list = 0)
  905. {
  906. ObjCMethodPrototypeAST *ast = new (&pool) ObjCMethodPrototypeAST;
  907. ast->type_name = type_name;
  908. ast->selector = selector;
  909. ast->argument_list = argument_list;
  910. ast->attribute_list = attribute_list;
  911. return ast;
  912. }
  913. ObjCMethodDeclarationAST *ObjCMethodDeclaration(ObjCMethodPrototypeAST *method_prototype = 0, StatementAST *function_body = 0)
  914. {
  915. ObjCMethodDeclarationAST *ast = new (&pool) ObjCMethodDeclarationAST;
  916. ast->method_prototype = method_prototype;
  917. ast->function_body = function_body;
  918. return ast;
  919. }
  920. ObjCSynthesizedPropertyAST *ObjCSynthesizedProperty()
  921. {
  922. ObjCSynthesizedPropertyAST *ast = new (&pool) ObjCSynthesizedPropertyAST;
  923. return ast;
  924. }
  925. ObjCSynthesizedPropertiesDeclarationAST *ObjCSynthesizedPropertiesDeclaration(ObjCSynthesizedPropertyListAST *property_identifier_list = 0)
  926. {
  927. ObjCSynthesizedPropertiesDeclarationAST *ast = new (&pool) ObjCSynthesizedPropertiesDeclarationAST;
  928. ast->property_identifier_list = property_identifier_list;
  929. return ast;
  930. }
  931. ObjCDynamicPropertiesDeclarationAST *ObjCDynamicPropertiesDeclaration(NameListAST *property_identifier_list = 0)
  932. {
  933. ObjCDynamicPropertiesDeclarationAST *ast = new (&pool) ObjCDynamicPropertiesDeclarationAST;
  934. ast->property_identifier_list = property_identifier_list;
  935. return ast;
  936. }
  937. ObjCFastEnumerationAST *ObjCFastEnumeration(SpecifierListAST *type_specifier_list = 0, DeclaratorAST *declarator = 0, ExpressionAST *initializer = 0, ExpressionAST *fast_enumeratable_expression = 0, StatementAST *statement = 0)
  938. {
  939. ObjCFastEnumerationAST *ast = new (&pool) ObjCFastEnumerationAST;
  940. ast->type_specifier_list = type_specifier_list;
  941. ast->declarator = declarator;
  942. ast->initializer = initializer;
  943. ast->fast_enumeratable_expression = fast_enumeratable_expression;
  944. ast->statement = statement;
  945. return ast;
  946. }
  947. ObjCSynchronizedStatementAST *ObjCSynchronizedStatement(ExpressionAST *synchronized_object = 0, StatementAST *statement = 0)
  948. {
  949. ObjCSynchronizedStatementAST *ast = new (&pool) ObjCSynchronizedStatementAST;
  950. ast->synchronized_object = synchronized_object;
  951. ast->statement = statement;
  952. return ast;
  953. }
  954. LambdaExpressionAST *LambdaExpression(LambdaIntroducerAST *lambda_introducer = 0, LambdaDeclaratorAST *lambda_declarator = 0, StatementAST *statement = 0)
  955. {
  956. LambdaExpressionAST *ast = new (&pool) LambdaExpressionAST;
  957. ast->lambda_introducer = lambda_introducer;
  958. ast->lambda_declarator = lambda_declarator;
  959. ast->statement = statement;
  960. return ast;
  961. }
  962. LambdaIntroducerAST *LambdaIntroducer(LambdaCaptureAST *lambda_capture = 0)
  963. {
  964. LambdaIntroducerAST *ast = new (&pool) LambdaIntroducerAST;
  965. ast->lambda_capture = lambda_capture;
  966. return ast;
  967. }
  968. LambdaCaptureAST *LambdaCapture(CaptureListAST *capture_list = 0)
  969. {
  970. LambdaCaptureAST *ast = new (&pool) LambdaCaptureAST;
  971. ast->capture_list = capture_list;
  972. return ast;
  973. }
  974. CaptureAST *Capture(NameAST *identifier = 0)
  975. {
  976. CaptureAST *ast = new (&pool) CaptureAST;
  977. ast->identifier = identifier;
  978. return ast;
  979. }
  980. LambdaDeclaratorAST *LambdaDeclarator(ParameterDeclarationClauseAST *parameter_declaration_clause = 0, SpecifierListAST *attributes = 0, ExceptionSpecificationAST *exception_specification = 0, TrailingReturnTypeAST *trailing_return_type = 0)
  981. {
  982. LambdaDeclaratorAST *ast = new (&pool) LambdaDeclaratorAST;
  983. ast->parameter_declaration_clause = parameter_declaration_clause;
  984. ast->attributes = attributes;
  985. ast->exception_specification = exception_specification;
  986. ast->trailing_return_type = trailing_return_type;
  987. return ast;
  988. }
  989. TrailingReturnTypeAST *TrailingReturnType(SpecifierListAST *attributes = 0, SpecifierListAST *type_specifier_list = 0, DeclaratorAST *declarator = 0)
  990. {
  991. TrailingReturnTypeAST *ast = new (&pool) TrailingReturnTypeAST;
  992. ast->attributes = attributes;
  993. ast->type_specifier_list = type_specifier_list;
  994. ast->declarator = declarator;
  995. return ast;
  996. }
  997. BracedInitializerAST *BracedInitializer(ExpressionListAST *expression_list = 0)
  998. {
  999. BracedInitializerAST *ast = new (&pool) BracedInitializerAST;
  1000. ast->expression_list = expression_list;
  1001. return ast;
  1002. }
  1003. DotDesignatorAST *DotDesignator()
  1004. {
  1005. DotDesignatorAST *ast = new (&pool) DotDesignatorAST;
  1006. return ast;
  1007. }
  1008. BracketDesignatorAST *BracketDesignator(ExpressionAST *expression = 0)
  1009. {
  1010. BracketDesignatorAST *ast = new (&pool) BracketDesignatorAST;
  1011. ast->expression = expression;
  1012. return ast;
  1013. }
  1014. DesignatedInitializerAST *DesignatedInitializer(DesignatorListAST *designator_list = 0, ExpressionAST *initializer = 0)
  1015. {
  1016. DesignatedInitializerAST *ast = new (&pool) DesignatedInitializerAST;
  1017. ast->designator_list = designator_list;
  1018. ast->initializer = initializer;
  1019. return ast;
  1020. }
  1021. BaseSpecifierListAST *BaseSpecifierList(BaseSpecifierAST *value, BaseSpecifierListAST *next = 0)
  1022. {
  1023. BaseSpecifierListAST *list = new (&pool) BaseSpecifierListAST;
  1024. list->next = next;
  1025. list->value = value;
  1026. return list;
  1027. }
  1028. CaptureListAST *CaptureList(CaptureAST *value, CaptureListAST *next = 0)
  1029. {
  1030. CaptureListAST *list = new (&pool) CaptureListAST;
  1031. list->next = next;
  1032. list->value = value;
  1033. return list;
  1034. }
  1035. CatchClauseListAST *CatchClauseList(CatchClauseAST *value, CatchClauseListAST *next = 0)
  1036. {
  1037. CatchClauseListAST *list = new (&pool) CatchClauseListAST;
  1038. list->next = next;
  1039. list->value = value;
  1040. return list;
  1041. }
  1042. DeclarationListAST *DeclarationList(DeclarationAST *value, DeclarationListAST *next = 0)
  1043. {
  1044. DeclarationListAST *list = new (&pool) DeclarationListAST;
  1045. list->next = next;
  1046. list->value = value;
  1047. return list;
  1048. }
  1049. DeclaratorListAST *DeclaratorList(DeclaratorAST *value, DeclaratorListAST *next = 0)
  1050. {
  1051. DeclaratorListAST *list = new (&pool) DeclaratorListAST;
  1052. list->next = next;
  1053. list->value = value;
  1054. return list;
  1055. }
  1056. DesignatorListAST *DesignatorList(DesignatorAST *value, DesignatorListAST *next = 0)
  1057. {
  1058. DesignatorListAST *list = new (&pool) DesignatorListAST;
  1059. list->next = next;
  1060. list->value = value;
  1061. return list;
  1062. }
  1063. EnumeratorListAST *EnumeratorList(EnumeratorAST *value, EnumeratorListAST *next = 0)
  1064. {
  1065. EnumeratorListAST *list = new (&pool) EnumeratorListAST;
  1066. list->next = next;
  1067. list->value = value;
  1068. return list;
  1069. }
  1070. ExpressionListAST *ExpressionList(ExpressionAST *value, ExpressionListAST *next = 0)
  1071. {
  1072. ExpressionListAST *list = new (&pool) ExpressionListAST;
  1073. list->next = next;
  1074. list->value = value;
  1075. return list;
  1076. }
  1077. GnuAttributeListAST *GnuAttributeList(GnuAttributeAST *value, GnuAttributeListAST *next = 0)
  1078. {
  1079. GnuAttributeListAST *list = new (&pool) GnuAttributeListAST;
  1080. list->next = next;
  1081. list->value = value;
  1082. return list;
  1083. }
  1084. MemInitializerListAST *MemInitializerList(MemInitializerAST *value, MemInitializerListAST *next = 0)
  1085. {
  1086. MemInitializerListAST *list = new (&pool) MemInitializerListAST;
  1087. list->next = next;
  1088. list->value = value;
  1089. return list;
  1090. }
  1091. NameListAST *NameList(NameAST *value, NameListAST *next = 0)
  1092. {
  1093. NameListAST *list = new (&pool) NameListAST;
  1094. list->next = next;
  1095. list->value = value;
  1096. return list;
  1097. }
  1098. NestedNameSpecifierListAST *NestedNameSpecifierList(NestedNameSpecifierAST *value, NestedNameSpecifierListAST *next = 0)
  1099. {
  1100. NestedNameSpecifierListAST *list = new (&pool) NestedNameSpecifierListAST;
  1101. list->next = next;
  1102. list->value = value;
  1103. return list;
  1104. }
  1105. NewArrayDeclaratorListAST *NewArrayDeclaratorList(NewArrayDeclaratorAST *value, NewArrayDeclaratorListAST *next = 0)
  1106. {
  1107. NewArrayDeclaratorListAST *list = new (&pool) NewArrayDeclaratorListAST;
  1108. list->next = next;
  1109. list->value = value;
  1110. return list;
  1111. }
  1112. ObjCMessageArgumentDeclarationListAST *ObjCMessageArgumentDeclarationList(ObjCMessageArgumentDeclarationAST *value, ObjCMessageArgumentDeclarationListAST *next = 0)
  1113. {
  1114. ObjCMessageArgumentDeclarationListAST *list = new (&pool) ObjCMessageArgumentDeclarationListAST;
  1115. list->next = next;
  1116. list->value = value;
  1117. return list;
  1118. }
  1119. ObjCMessageArgumentListAST *ObjCMessageArgumentList(ObjCMessageArgumentAST *value, ObjCMessageArgumentListAST *next = 0)
  1120. {
  1121. ObjCMessageArgumentListAST *list = new (&pool) ObjCMessageArgumentListAST;
  1122. list->next = next;
  1123. list->value = value;
  1124. return list;
  1125. }
  1126. ObjCPropertyAttributeListAST *ObjCPropertyAttributeList(ObjCPropertyAttributeAST *value, ObjCPropertyAttributeListAST *next = 0)
  1127. {
  1128. ObjCPropertyAttributeListAST *list = new (&pool) ObjCPropertyAttributeListAST;
  1129. list->next = next;
  1130. list->value = value;
  1131. return list;
  1132. }
  1133. ObjCSelectorArgumentListAST *ObjCSelectorArgumentList(ObjCSelectorArgumentAST *value, ObjCSelectorArgumentListAST *next = 0)
  1134. {
  1135. ObjCSelectorArgumentListAST *list = new (&pool) ObjCSelectorArgumentListAST;
  1136. list->next = next;
  1137. list->value = value;
  1138. return list;
  1139. }
  1140. ObjCSynthesizedPropertyListAST *ObjCSynthesizedPropertyList(ObjCSynthesizedPropertyAST *value, ObjCSynthesizedPropertyListAST *next = 0)
  1141. {
  1142. ObjCSynthesizedPropertyListAST *list = new (&pool) ObjCSynthesizedPropertyListAST;
  1143. list->next = next;
  1144. list->value = value;
  1145. return list;
  1146. }
  1147. ParameterDeclarationListAST *ParameterDeclarationList(ParameterDeclarationAST *value, ParameterDeclarationListAST *next = 0)
  1148. {
  1149. ParameterDeclarationListAST *list = new (&pool) ParameterDeclarationListAST;
  1150. list->next = next;
  1151. list->value = value;
  1152. return list;
  1153. }
  1154. PostfixDeclaratorListAST *PostfixDeclaratorList(PostfixDeclaratorAST *value, PostfixDeclaratorListAST *next = 0)
  1155. {
  1156. PostfixDeclaratorListAST *list = new (&pool) PostfixDeclaratorListAST;
  1157. list->next = next;
  1158. list->value = value;
  1159. return list;
  1160. }
  1161. PtrOperatorListAST *PtrOperatorList(PtrOperatorAST *value, PtrOperatorListAST *next = 0)
  1162. {
  1163. PtrOperatorListAST *list = new (&pool) PtrOperatorListAST;
  1164. list->next = next;
  1165. list->value = value;
  1166. return list;
  1167. }
  1168. QtInterfaceNameListAST *QtInterfaceNameList(QtInterfaceNameAST *value, QtInterfaceNameListAST *next = 0)
  1169. {
  1170. QtInterfaceNameListAST *list = new (&pool) QtInterfaceNameListAST;
  1171. list->next = next;
  1172. list->value = value;
  1173. return list;
  1174. }
  1175. QtPropertyDeclarationItemListAST *QtPropertyDeclarationItemList(QtPropertyDeclarationItemAST *value, QtPropertyDeclarationItemListAST *next = 0)
  1176. {
  1177. QtPropertyDeclarationItemListAST *list = new (&pool) QtPropertyDeclarationItemListAST;
  1178. list->next = next;
  1179. list->value = value;
  1180. return list;
  1181. }
  1182. SpecifierListAST *SpecifierList(SpecifierAST *value, SpecifierListAST *next = 0)
  1183. {
  1184. SpecifierListAST *list = new (&pool) SpecifierListAST;
  1185. list->next = next;
  1186. list->value = value;
  1187. return list;
  1188. }
  1189. StatementListAST *StatementList(StatementAST *value, StatementListAST *next = 0)
  1190. {
  1191. StatementListAST *list = new (&pool) StatementListAST;
  1192. list->next = next;
  1193. list->value = value;
  1194. return list;
  1195. }
  1196. };
  1197. } // end of namespace CPlusPlus
  1198. #endif // CPLUSPLUS_AST_PATTERN_BUILDER_H