@idlizer/arktscgen 2.1.2 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/build/libarkts-copy/README.md +36 -0
  2. package/build/libarkts-copy/generator/options.json5 +113 -44
  3. package/build/libarkts-copy/native/src/bridges.cc +70 -2
  4. package/build/libarkts-copy/native/src/generated/bridges.cc +700 -200
  5. package/build/libarkts-copy/package.json +27 -15
  6. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +42 -4
  7. package/build/libarkts-copy/src/InteropNativeModule.ts +2 -1
  8. package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +50 -0
  9. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +8 -6
  10. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +95 -117
  11. package/build/libarkts-copy/src/arkts-api/index.ts +3 -1
  12. package/build/libarkts-copy/src/arkts-api/node-cache.ts +35 -0
  13. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +42 -0
  14. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrowFunctionExpression.ts +49 -0
  15. package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +50 -0
  16. package/build/libarkts-copy/src/arkts-api/node-utilities/{createCallExpression.ts → CallExpression.ts} +27 -4
  17. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +73 -0
  18. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +41 -0
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +65 -0
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +63 -0
  21. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +60 -0
  22. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +31 -0
  23. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +31 -0
  24. package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +41 -0
  25. package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +75 -0
  26. package/build/libarkts-copy/src/arkts-api/node-utilities/{createNumberLiteral.ts → NumberLiteral.ts} +15 -0
  27. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +34 -0
  28. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +99 -0
  29. package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +61 -0
  30. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +60 -0
  31. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +39 -0
  32. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +36 -0
  33. package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +44 -0
  34. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclaration.ts +54 -0
  35. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +37 -0
  36. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +15 -14
  37. package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +30 -0
  38. package/build/libarkts-copy/src/arkts-api/peers/Program.ts +4 -4
  39. package/build/libarkts-copy/src/arkts-api/peers/SourcePosition.ts +38 -0
  40. package/build/libarkts-copy/src/arkts-api/static/global.ts +5 -0
  41. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +25 -0
  42. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +13 -11
  43. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +68 -10
  44. package/build/libarkts-copy/src/arkts-api/visitor.ts +175 -42
  45. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +504 -458
  46. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +225 -75
  47. package/build/libarkts-copy/src/generated/factory.ts +21 -43
  48. package/build/libarkts-copy/src/generated/index.ts +24 -3
  49. package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +1 -2
  50. package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +1 -2
  51. package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +1 -2
  52. package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +7 -7
  53. package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +12 -12
  54. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +10 -5
  55. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +7 -7
  56. package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +5 -5
  57. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +13 -7
  58. package/build/libarkts-copy/src/generated/peers/AstDumper.ts +1 -2
  59. package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +35 -0
  60. package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +35 -0
  61. package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +4 -4
  62. package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +4 -4
  63. package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +14 -7
  64. package/build/libarkts-copy/src/generated/peers/BindingProps.ts +35 -0
  65. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +5 -5
  66. package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +15 -5
  67. package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +4 -4
  68. package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +8 -5
  69. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +8 -8
  70. package/build/libarkts-copy/src/generated/peers/CatchClause.ts +6 -6
  71. package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +12 -5
  72. package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +4 -4
  73. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +5 -5
  74. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +30 -15
  75. package/build/libarkts-copy/src/generated/peers/ClassElement.ts +7 -8
  76. package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +4 -4
  77. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +21 -5
  78. package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +5 -5
  79. package/build/libarkts-copy/src/generated/peers/CodeGen.ts +35 -0
  80. package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +7 -7
  81. package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +8 -5
  82. package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +4 -4
  83. package/build/libarkts-copy/src/generated/peers/Declaration.ts +35 -0
  84. package/build/libarkts-copy/src/generated/peers/Decorator.ts +4 -4
  85. package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +4 -4
  86. package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +6 -6
  87. package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +35 -0
  88. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +4 -4
  89. package/build/libarkts-copy/src/generated/peers/ETSDynamicFunctionType.ts +1 -2
  90. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +15 -15
  91. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +26 -17
  92. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +53 -0
  93. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +6 -6
  94. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +11 -6
  95. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +5 -5
  96. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +11 -6
  97. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +6 -6
  98. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +4 -4
  99. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +10 -10
  100. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +4 -4
  101. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +5 -5
  102. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +50 -0
  103. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +4 -4
  104. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +5 -5
  105. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +5 -5
  106. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +8 -8
  107. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +6 -6
  108. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +7 -7
  109. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +5 -5
  110. package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +4 -4
  111. package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +35 -0
  112. package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +4 -4
  113. package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +5 -5
  114. package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +4 -4
  115. package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +4 -4
  116. package/build/libarkts-copy/src/generated/peers/Expression.ts +4 -5
  117. package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +6 -6
  118. package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +7 -7
  119. package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +7 -7
  120. package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +7 -7
  121. package/build/libarkts-copy/src/generated/peers/FunctionDecl.ts +1 -2
  122. package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +8 -8
  123. package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +5 -5
  124. package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +6 -7
  125. package/build/libarkts-copy/src/generated/peers/IRNode.ts +35 -0
  126. package/build/libarkts-copy/src/generated/peers/Identifier.ts +5 -5
  127. package/build/libarkts-copy/src/generated/peers/IfStatement.ts +9 -9
  128. package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +10 -10
  129. package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +5 -5
  130. package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +5 -5
  131. package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +5 -5
  132. package/build/libarkts-copy/src/generated/peers/ImportSource.ts +1 -15
  133. package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +14 -6
  134. package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +35 -0
  135. package/build/libarkts-copy/src/generated/peers/InterfaceDecl.ts +1 -2
  136. package/build/libarkts-copy/src/generated/peers/LabelPair.ts +35 -0
  137. package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +6 -6
  138. package/build/libarkts-copy/src/generated/peers/Literal.ts +1 -2
  139. package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +1 -2
  140. package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +1 -2
  141. package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +24 -8
  142. package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +4 -4
  143. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +25 -8
  144. package/build/libarkts-copy/src/generated/peers/NamedType.ts +4 -4
  145. package/build/libarkts-copy/src/generated/peers/NewExpression.ts +4 -4
  146. package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +4 -4
  147. package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +19 -4
  148. package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +35 -0
  149. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +4 -4
  150. package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +4 -4
  151. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +4 -4
  152. package/build/libarkts-copy/src/generated/peers/OverloadInfo.ts +35 -0
  153. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +4 -4
  154. package/build/libarkts-copy/src/generated/peers/Property.ts +6 -6
  155. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +4 -4
  156. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +8 -5
  157. package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +35 -0
  158. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +16 -11
  159. package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +35 -0
  160. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +5 -5
  161. package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +35 -0
  162. package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +35 -0
  163. package/build/libarkts-copy/src/generated/peers/SourceRange.ts +35 -0
  164. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +5 -5
  165. package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +1 -2
  166. package/build/libarkts-copy/src/generated/peers/Statement.ts +1 -2
  167. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +4 -4
  168. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +4 -4
  169. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +5 -5
  170. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +6 -6
  171. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +4 -4
  172. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +4 -4
  173. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +5 -5
  174. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +4 -4
  175. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +4 -4
  176. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +5 -5
  177. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +4 -4
  178. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +6 -6
  179. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +5 -5
  180. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +6 -6
  181. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +4 -4
  182. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +6 -6
  183. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +4 -4
  184. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +4 -4
  185. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +4 -4
  186. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +4 -4
  187. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +4 -4
  188. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +5 -5
  189. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +10 -10
  190. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +5 -5
  191. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +4 -4
  192. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +4 -4
  193. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +4 -4
  194. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +7 -7
  195. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +4 -4
  196. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +4 -4
  197. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +5 -5
  198. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +4 -4
  199. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +5 -5
  200. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +4 -4
  201. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +4 -4
  202. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +4 -4
  203. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +4 -4
  204. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +4 -4
  205. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +5 -5
  206. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +7 -7
  207. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +6 -6
  208. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +4 -4
  209. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +4 -4
  210. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +4 -4
  211. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +8 -8
  212. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +4 -4
  213. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +4 -4
  214. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +4 -4
  215. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +7 -7
  216. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +4 -4
  217. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +4 -4
  218. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +4 -4
  219. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +4 -4
  220. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +4 -4
  221. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +4 -4
  222. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +4 -4
  223. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +4 -4
  224. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +4 -4
  225. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +4 -4
  226. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +4 -4
  227. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +4 -4
  228. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +4 -4
  229. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +4 -4
  230. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +10 -6
  231. package/build/libarkts-copy/src/generated/peers/TypeNode.ts +2 -3
  232. package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +1 -2
  233. package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +1 -2
  234. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +4 -4
  235. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +5 -5
  236. package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +4 -4
  237. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +5 -5
  238. package/build/libarkts-copy/src/generated/peers/VReg.ts +35 -0
  239. package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +4 -4
  240. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +5 -5
  241. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +7 -7
  242. package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +35 -0
  243. package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +35 -0
  244. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +6 -6
  245. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +4 -4
  246. package/build/libarkts-copy/src/index.ts +17 -0
  247. package/build/libarkts-copy/src/reexport-for-generated.ts +1 -1
  248. package/build/libarkts-copy/src/utils.ts +307 -9
  249. package/build/libarkts-copy/tsconfig.json +4 -4
  250. package/lib/index.js +1516 -1120
  251. package/package.json +6 -6
  252. package/templates/factory.ts +0 -1
  253. package/templates/peer.ts +0 -1
  254. package/build/libarkts-copy/src/Es2pandaEnums.ts +0 -183
  255. package/build/libarkts-copy/src/arkts-api/node-utilities/createScriptFunction.ts +0 -55
  256. package/build/libarkts-copy/src/es2panda.ts +0 -277
  257. package/build/libarkts-copy/src/generated/node-map.ts +0 -182
  258. package/build/libarkts-copy/src/generated/peers/ETSLaunchExpression.ts +0 -57
@@ -22,7 +22,6 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
@@ -42,7 +41,6 @@ import { BlockExpression } from "./peers/BlockExpression"
42
41
  import { BlockStatement } from "./peers/BlockStatement"
43
42
  import { BooleanLiteral } from "./peers/BooleanLiteral"
44
43
  import { BreakStatement } from "./peers/BreakStatement"
45
- import { CallExpression } from "./peers/CallExpression"
46
44
  import { CatchClause } from "./peers/CatchClause"
47
45
  import { ChainExpression } from "./peers/ChainExpression"
48
46
  import { CharLiteral } from "./peers/CharLiteral"
@@ -55,7 +53,7 @@ import { DebuggerStatement } from "./peers/DebuggerStatement"
55
53
  import { Decorator } from "./peers/Decorator"
56
54
  import { DoWhileStatement } from "./peers/DoWhileStatement"
57
55
  import { ETSClassLiteral } from "./peers/ETSClassLiteral"
58
- import { ETSLaunchExpression } from "./peers/ETSLaunchExpression"
56
+ import { ETSKeyofType } from "./peers/ETSKeyofType"
59
57
  import { ETSNewArrayInstanceExpression } from "./peers/ETSNewArrayInstanceExpression"
60
58
  import { ETSNewClassInstanceExpression } from "./peers/ETSNewClassInstanceExpression"
61
59
  import { ETSNewMultiDimArrayInstanceExpression } from "./peers/ETSNewMultiDimArrayInstanceExpression"
@@ -87,7 +85,6 @@ import { IfStatement } from "./peers/IfStatement"
87
85
  import { ImportDefaultSpecifier } from "./peers/ImportDefaultSpecifier"
88
86
  import { ImportExpression } from "./peers/ImportExpression"
89
87
  import { ImportNamespaceSpecifier } from "./peers/ImportNamespaceSpecifier"
90
- import { ImportSource } from "./peers/ImportSource"
91
88
  import { ImportSpecifier } from "./peers/ImportSpecifier"
92
89
  import { LabelledStatement } from "./peers/LabelledStatement"
93
90
  import { MetaProperty } from "./peers/MetaProperty"
@@ -158,7 +155,6 @@ import { TypeofExpression } from "./peers/TypeofExpression"
158
155
  import { UnaryExpression } from "./peers/UnaryExpression"
159
156
  import { UndefinedLiteral } from "./peers/UndefinedLiteral"
160
157
  import { UpdateExpression } from "./peers/UpdateExpression"
161
- import { ValidationInfo } from "./peers/ValidationInfo"
162
158
  import { VariableDeclaration } from "./peers/VariableDeclaration"
163
159
  import { VariableDeclarator } from "./peers/VariableDeclarator"
164
160
  import { WhileStatement } from "./peers/WhileStatement"
@@ -192,11 +188,11 @@ export const factory = {
192
188
  return updateNodeByNode(TSVoidKeyword.createTSVoidKeyword(), original)
193
189
  }
194
190
  ,
195
- createIfStatement(test: Expression, consequent: Statement, alternate?: Statement): IfStatement {
191
+ createIfStatement(test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement {
196
192
  return IfStatement.createIfStatement(test, consequent, alternate)
197
193
  }
198
194
  ,
199
- updateIfStatement(original: IfStatement, test: Expression, consequent: Statement, alternate?: Statement): IfStatement {
195
+ updateIfStatement(original: IfStatement, test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement {
200
196
  if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent) && isSameNativeObject(alternate, original.alternate))
201
197
  return original
202
198
  return updateNodeByNode(IfStatement.createIfStatement(test, consequent, alternate), original)
@@ -280,11 +276,11 @@ export const factory = {
280
276
  return updateNodeByNode(TaggedTemplateExpression.createTaggedTemplateExpression(tag, quasi, typeParams), original)
281
277
  }
282
278
  ,
283
- createFunctionDeclaration(_function: ScriptFunction, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration {
279
+ createFunctionDeclaration(_function: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration {
284
280
  return FunctionDeclaration.createFunctionDeclaration(_function, annotations, isAnonymous)
285
281
  }
286
282
  ,
287
- updateFunctionDeclaration(original: FunctionDeclaration, _function: ScriptFunction, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration {
283
+ updateFunctionDeclaration(original: FunctionDeclaration, _function: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration {
288
284
  if (isSameNativeObject(_function, original.function) && isSameNativeObject(annotations, original.annotations) && isSameNativeObject(isAnonymous, original.isAnonymous))
289
285
  return original
290
286
  return updateNodeByNode(FunctionDeclaration.createFunctionDeclaration(_function, annotations, isAnonymous), original)
@@ -310,16 +306,6 @@ export const factory = {
310
306
  return updateNodeByNode(TSTypeReference.createTSTypeReference(typeName, typeParams), original)
311
307
  }
312
308
  ,
313
- createImportSource(source: StringLiteral | undefined, resolvedSource: StringLiteral | undefined, hasDecl: boolean): ImportSource {
314
- return ImportSource.createImportSource(source, resolvedSource, hasDecl)
315
- }
316
- ,
317
- updateImportSource(original: ImportSource, source: StringLiteral | undefined, resolvedSource: StringLiteral | undefined, hasDecl: boolean): ImportSource {
318
- if (isSameNativeObject(source, original.source) && isSameNativeObject(resolvedSource, original.resolvedSource) && isSameNativeObject(hasDecl, original.hasDecl))
319
- return original
320
- return updateNodeByNode(ImportSource.createImportSource(source, resolvedSource, hasDecl), original)
321
- }
322
- ,
323
309
  createNamedType(name?: Identifier): NamedType {
324
310
  return NamedType.createNamedType(name)
325
311
  }
@@ -386,6 +372,16 @@ export const factory = {
386
372
  return updateNodeByNode(ETSUnionType.createETSUnionType(types), original)
387
373
  }
388
374
  ,
375
+ createETSKeyofType(typeRef?: TypeNode): ETSKeyofType {
376
+ return ETSKeyofType.createETSKeyofType(typeRef)
377
+ }
378
+ ,
379
+ updateETSKeyofType(original: ETSKeyofType, typeRef?: TypeNode): ETSKeyofType {
380
+ if (isSameNativeObject(typeRef, original.typeRef))
381
+ return original
382
+ return updateNodeByNode(ETSKeyofType.createETSKeyofType(typeRef), original)
383
+ }
384
+ ,
389
385
  createTSConditionalType(checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType {
390
386
  return TSConditionalType.createTSConditionalType(checkType, extendsType, trueType, falseType)
391
387
  }
@@ -406,11 +402,11 @@ export const factory = {
406
402
  return updateNodeByNode(TSLiteralType.createTSLiteralType(literal), original)
407
403
  }
408
404
  ,
409
- createTSTypeAliasDeclaration(id?: Identifier, typeParams?: TSTypeParameterDeclaration, typeAnnotation?: TypeNode): TSTypeAliasDeclaration {
405
+ createTSTypeAliasDeclaration(id: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, typeAnnotation: TypeNode): TSTypeAliasDeclaration {
410
406
  return TSTypeAliasDeclaration.createTSTypeAliasDeclaration(id, typeParams, typeAnnotation)
411
407
  }
412
408
  ,
413
- updateTSTypeAliasDeclaration(original: TSTypeAliasDeclaration, id?: Identifier, typeParams?: TSTypeParameterDeclaration, typeAnnotation?: TypeNode): TSTypeAliasDeclaration {
409
+ updateTSTypeAliasDeclaration(original: TSTypeAliasDeclaration, id: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, typeAnnotation: TypeNode): TSTypeAliasDeclaration {
414
410
  if (isSameNativeObject(id, original.id) && isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(typeAnnotation, original.typeAnnotation))
415
411
  return original
416
412
  return updateNodeByNode(TSTypeAliasDeclaration.createTSTypeAliasDeclaration(id, typeParams, typeAnnotation), original)
@@ -584,11 +580,11 @@ export const factory = {
584
580
  return updateNodeByNode(TSStringKeyword.createTSStringKeyword(), original)
585
581
  }
586
582
  ,
587
- createExpressionStatement(expression: Expression): ExpressionStatement {
583
+ createExpressionStatement(expression?: Expression): ExpressionStatement {
588
584
  return ExpressionStatement.createExpressionStatement(expression)
589
585
  }
590
586
  ,
591
- updateExpressionStatement(original: ExpressionStatement, expression: Expression): ExpressionStatement {
587
+ updateExpressionStatement(original: ExpressionStatement, expression?: Expression): ExpressionStatement {
592
588
  if (isSameNativeObject(expression, original.expression))
593
589
  return original
594
590
  return updateNodeByNode(ExpressionStatement.createExpressionStatement(expression), original)
@@ -720,16 +716,6 @@ export const factory = {
720
716
  return updateNodeByNode(EmptyStatement.createEmptyStatement(), original)
721
717
  }
722
718
  ,
723
- createETSLaunchExpression(call?: CallExpression): ETSLaunchExpression {
724
- return ETSLaunchExpression.createETSLaunchExpression(call)
725
- }
726
- ,
727
- updateETSLaunchExpression(original: ETSLaunchExpression, call?: CallExpression): ETSLaunchExpression {
728
- if (isSameNativeObject(call, original.call))
729
- return original
730
- return updateNodeByNode(ETSLaunchExpression.createETSLaunchExpression(call), original)
731
- }
732
- ,
733
719
  createWhileStatement(test?: Expression, body?: Statement): WhileStatement {
734
720
  return WhileStatement.createWhileStatement(test, body)
735
721
  }
@@ -1096,14 +1082,6 @@ export const factory = {
1096
1082
  return updateNodeByNode(AwaitExpression.createAwaitExpression(argument), original)
1097
1083
  }
1098
1084
  ,
1099
- createValidationInfo(): ValidationInfo {
1100
- return ValidationInfo.createValidationInfo()
1101
- }
1102
- ,
1103
- updateValidationInfo(original: ValidationInfo): ValidationInfo {
1104
- return updateNodeByNode(ValidationInfo.createValidationInfo(), original)
1105
- }
1106
- ,
1107
1085
  createContinueStatement(ident?: Identifier): ContinueStatement {
1108
1086
  return ContinueStatement.create1ContinueStatement(ident)
1109
1087
  }
@@ -1220,11 +1198,11 @@ export const factory = {
1220
1198
  return updateNodeByNode(SequenceExpression.createSequenceExpression(sequence), original)
1221
1199
  }
1222
1200
  ,
1223
- createArrowFunctionExpression(_function: ScriptFunction): ArrowFunctionExpression {
1201
+ createArrowFunctionExpression(_function?: ScriptFunction): ArrowFunctionExpression {
1224
1202
  return ArrowFunctionExpression.createArrowFunctionExpression(_function)
1225
1203
  }
1226
1204
  ,
1227
- updateArrowFunctionExpression(original: ArrowFunctionExpression, _function: ScriptFunction): ArrowFunctionExpression {
1205
+ updateArrowFunctionExpression(original: ArrowFunctionExpression, _function?: ScriptFunction): ArrowFunctionExpression {
1228
1206
  if (isSameNativeObject(_function, original.function))
1229
1207
  return original
1230
1208
  return updateNodeByNode(ArrowFunctionExpression.createArrowFunctionExpression(_function), original)
@@ -13,6 +13,28 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
+ export * from "./peers/SourcePosition"
17
+ export * from "./peers/SourceRange"
18
+ export * from "./peers/LabelPair"
19
+ export * from "./peers/ScriptFunctionData"
20
+ export * from "./peers/ImportSource"
21
+ export * from "./peers/SignatureInfo"
22
+ export * from "./peers/IndexInfo"
23
+ export * from "./peers/ObjectDescriptor"
24
+ export * from "./peers/ScopeFindResult"
25
+ export * from "./peers/BindingProps"
26
+ export * from "./peers/Declaration"
27
+ export * from "./peers/AstVisitor"
28
+ export * from "./peers/AstVerifier"
29
+ export * from "./peers/VerifierMessage"
30
+ export * from "./peers/CodeGen"
31
+ export * from "./peers/VReg"
32
+ export * from "./peers/IRNode"
33
+ export * from "./peers/ErrorLogger"
34
+ export * from "./peers/VerificationContext"
35
+ export * from "./peers/DynamicImportData"
36
+ export * from "./peers/OverloadInfo"
37
+ export * from "./peers/NumberLiteral"
16
38
  export * from "./peers/TypedAstNode"
17
39
  export * from "./peers/AnnotatedAstNode"
18
40
  export * from "./peers/TypedStatement"
@@ -40,9 +62,7 @@ export * from "./peers/TaggedTemplateExpression"
40
62
  export * from "./peers/FunctionDeclaration"
41
63
  export * from "./peers/ETSTypeReference"
42
64
  export * from "./peers/TSTypeReference"
43
- export * from "./peers/ImportSource"
44
65
  export * from "./peers/NamedType"
45
- export * from "./peers/NumberLiteral"
46
66
  export * from "./peers/TSFunctionType"
47
67
  export * from "./peers/TemplateElement"
48
68
  export * from "./peers/TSInterfaceDeclaration"
@@ -52,6 +72,7 @@ export * from "./peers/MemberExpression"
52
72
  export * from "./peers/TSClassImplements"
53
73
  export * from "./peers/TSObjectKeyword"
54
74
  export * from "./peers/ETSUnionType"
75
+ export * from "./peers/ETSKeyofType"
55
76
  export * from "./peers/TSPropertySignature"
56
77
  export * from "./peers/TSConditionalType"
57
78
  export * from "./peers/TSLiteralType"
@@ -72,6 +93,7 @@ export * from "./peers/TSTypeAssertion"
72
93
  export * from "./peers/TSExternalModuleReference"
73
94
  export * from "./peers/TSUndefinedKeyword"
74
95
  export * from "./peers/ETSTuple"
96
+ export * from "./peers/ETSStringLiteralType"
75
97
  export * from "./peers/TryStatement"
76
98
  export * from "./peers/UnaryExpression"
77
99
  export * from "./peers/ForInStatement"
@@ -106,7 +128,6 @@ export * from "./peers/LoopStatement"
106
128
  export * from "./peers/AnnotationDeclaration"
107
129
  export * from "./peers/AnnotationUsage"
108
130
  export * from "./peers/EmptyStatement"
109
- export * from "./peers/ETSLaunchExpression"
110
131
  export * from "./peers/WhileStatement"
111
132
  export * from "./peers/FunctionSignature"
112
133
  export * from "./peers/ChainExpression"
@@ -22,7 +22,6 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
@@ -30,7 +29,7 @@ import {
30
29
  } from "../../reexport-for-generated"
31
30
 
32
31
  export class AnnotatedAstNode extends AstNode {
33
- constructor(pointer: KNativePointer) {
32
+ constructor(pointer: KNativePointer) {
34
33
  super(pointer)
35
34
  }
36
35
  }
@@ -22,7 +22,6 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
@@ -32,7 +31,7 @@ import {
32
31
  import { Expression } from "./Expression"
33
32
  import { TypeNode } from "./TypeNode"
34
33
  export class AnnotatedExpression extends Expression {
35
- constructor(pointer: KNativePointer) {
34
+ constructor(pointer: KNativePointer) {
36
35
  super(pointer)
37
36
  }
38
37
  get typeAnnotation(): TypeNode | undefined {
@@ -22,7 +22,6 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
@@ -31,7 +30,7 @@ import {
31
30
 
32
31
  import { Statement } from "./Statement"
33
32
  export class AnnotatedStatement extends Statement {
34
- constructor(pointer: KNativePointer) {
33
+ constructor(pointer: KNativePointer) {
35
34
  super(pointer)
36
35
  }
37
36
  }
@@ -22,7 +22,6 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
@@ -30,11 +29,12 @@ import {
30
29
  } from "../../reexport-for-generated"
31
30
 
32
31
  import { AnnotationUsage } from "./AnnotationUsage"
32
+ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
33
33
  import { Expression } from "./Expression"
34
34
  import { Identifier } from "./Identifier"
35
35
  import { Statement } from "./Statement"
36
36
  export class AnnotationDeclaration extends Statement {
37
- constructor(pointer: KNativePointer) {
37
+ constructor(pointer: KNativePointer) {
38
38
  assertValidPeer(pointer, 1)
39
39
  super(pointer)
40
40
  }
@@ -56,10 +56,10 @@ export class AnnotationDeclaration extends Statement {
56
56
  return this
57
57
  }
58
58
  get expr(): Expression | undefined {
59
- return unpackNode(global.generatedEs2panda._AnnotationDeclarationExprConst(global.context, this.peer))
59
+ return unpackNode(global.generatedEs2panda._AnnotationDeclarationExpr(global.context, this.peer))
60
60
  }
61
61
  get properties(): readonly AstNode[] {
62
- return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationPropertiesConst(global.context, this.peer))
62
+ return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationProperties(global.context, this.peer))
63
63
  }
64
64
  /** @deprecated */
65
65
  addProperties(properties: readonly AstNode[]): this {
@@ -94,7 +94,7 @@ export class AnnotationDeclaration extends Statement {
94
94
  return unpackNode(global.generatedEs2panda._AnnotationDeclarationGetBaseNameConst(global.context, this.peer))
95
95
  }
96
96
  get annotations(): readonly AnnotationUsage[] {
97
- return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationAnnotationsConst(global.context, this.peer))
97
+ return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationAnnotations(global.context, this.peer))
98
98
  }
99
99
  /** @deprecated */
100
100
  setAnnotations(annotations: readonly AnnotationUsage[]): this {
@@ -105,6 +105,6 @@ export class AnnotationDeclaration extends Statement {
105
105
  export function isAnnotationDeclaration(node: object | undefined): node is AnnotationDeclaration {
106
106
  return node instanceof AnnotationDeclaration
107
107
  }
108
- if (!nodeByType.has(1)) {
109
- nodeByType.set(1, AnnotationDeclaration)
108
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION)) {
109
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION, (peer: KNativePointer) => new AnnotationDeclaration(peer))
110
110
  }
@@ -22,53 +22,53 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
29
28
  unpackString
30
29
  } from "../../reexport-for-generated"
31
30
 
31
+ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
32
32
  import { Expression } from "./Expression"
33
33
  import { Identifier } from "./Identifier"
34
34
  import { Statement } from "./Statement"
35
35
  export class AnnotationUsage extends Statement {
36
- constructor(pointer: KNativePointer) {
36
+ constructor(pointer: KNativePointer) {
37
37
  assertValidPeer(pointer, 2)
38
38
  super(pointer)
39
39
  }
40
40
  static create1AnnotationUsage(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage {
41
- return new AnnotationUsage(global.generatedEs2panda._CreateAnnotationUsageIr1(global.context, passNode(expr), passNodeArray(properties), properties.length))
41
+ return new AnnotationUsage(global.generatedEs2panda._CreateAnnotationUsage1(global.context, passNode(expr), passNodeArray(properties), properties.length))
42
42
  }
43
43
  static updateAnnotationUsage(original?: AnnotationUsage, expr?: Expression): AnnotationUsage {
44
- return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsageIr(global.context, passNode(original), passNode(expr)))
44
+ return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsage(global.context, passNode(original), passNode(expr)))
45
45
  }
46
46
  static update1AnnotationUsage(original: AnnotationUsage | undefined, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage {
47
- return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsageIr1(global.context, passNode(original), passNode(expr), passNodeArray(properties), properties.length))
47
+ return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsage1(global.context, passNode(original), passNode(expr), passNodeArray(properties), properties.length))
48
48
  }
49
49
  get expr(): Expression | undefined {
50
- return unpackNode(global.generatedEs2panda._AnnotationUsageIrExpr(global.context, this.peer))
50
+ return unpackNode(global.generatedEs2panda._AnnotationUsageExpr(global.context, this.peer))
51
51
  }
52
52
  get properties(): readonly AstNode[] {
53
- return unpackNodeArray(global.generatedEs2panda._AnnotationUsageIrPropertiesConst(global.context, this.peer))
53
+ return unpackNodeArray(global.generatedEs2panda._AnnotationUsageProperties(global.context, this.peer))
54
54
  }
55
55
  /** @deprecated */
56
56
  addProperty(property?: AstNode): this {
57
- global.generatedEs2panda._AnnotationUsageIrAddProperty(global.context, this.peer, passNode(property))
57
+ global.generatedEs2panda._AnnotationUsageAddProperty(global.context, this.peer, passNode(property))
58
58
  return this
59
59
  }
60
60
  /** @deprecated */
61
61
  setProperties(properties: readonly AstNode[]): this {
62
- global.generatedEs2panda._AnnotationUsageIrSetProperties(global.context, this.peer, passNodeArray(properties), properties.length)
62
+ global.generatedEs2panda._AnnotationUsageSetProperties(global.context, this.peer, passNodeArray(properties), properties.length)
63
63
  return this
64
64
  }
65
65
  get baseName(): Identifier | undefined {
66
- return unpackNode(global.generatedEs2panda._AnnotationUsageIrGetBaseNameConst(global.context, this.peer))
66
+ return unpackNode(global.generatedEs2panda._AnnotationUsageGetBaseNameConst(global.context, this.peer))
67
67
  }
68
68
  }
69
69
  export function isAnnotationUsage(node: object | undefined): node is AnnotationUsage {
70
70
  return node instanceof AnnotationUsage
71
71
  }
72
- if (!nodeByType.has(2)) {
73
- nodeByType.set(2, AnnotationUsage)
72
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE)) {
73
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE, (peer: KNativePointer) => new AnnotationUsage(peer))
74
74
  }
@@ -22,7 +22,6 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
@@ -31,11 +30,12 @@ import {
31
30
 
32
31
  import { AnnotatedExpression } from "./AnnotatedExpression"
33
32
  import { Decorator } from "./Decorator"
33
+ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
34
34
  import { Expression } from "./Expression"
35
35
  import { TypeNode } from "./TypeNode"
36
36
  import { ValidationInfo } from "./ValidationInfo"
37
37
  export class ArrayExpression extends AnnotatedExpression {
38
- constructor(pointer: KNativePointer) {
38
+ constructor(pointer: KNativePointer) {
39
39
  assertValidPeer(pointer, 156)
40
40
  super(pointer)
41
41
  }
@@ -49,7 +49,7 @@ export class ArrayExpression extends AnnotatedExpression {
49
49
  return new ArrayExpression(global.generatedEs2panda._UpdateArrayExpression1(global.context, passNode(original), nodeType, passNodeArray(elements), elements.length, trailingComma))
50
50
  }
51
51
  get elements(): readonly Expression[] {
52
- return unpackNodeArray(global.generatedEs2panda._ArrayExpressionElementsConst(global.context, this.peer))
52
+ return unpackNodeArray(global.generatedEs2panda._ArrayExpressionElements(global.context, this.peer))
53
53
  }
54
54
  /** @deprecated */
55
55
  setElements(elements: readonly Expression[]): this {
@@ -75,6 +75,11 @@ export class ArrayExpression extends AnnotatedExpression {
75
75
  get decorators(): readonly Decorator[] {
76
76
  return unpackNodeArray(global.generatedEs2panda._ArrayExpressionDecoratorsConst(global.context, this.peer))
77
77
  }
78
+ /** @deprecated */
79
+ clearPreferredType(): this {
80
+ global.generatedEs2panda._ArrayExpressionClearPreferredType(global.context, this.peer)
81
+ return this
82
+ }
78
83
  get convertibleToArrayPattern(): boolean {
79
84
  return global.generatedEs2panda._ArrayExpressionConvertibleToArrayPattern(global.context, this.peer)
80
85
  }
@@ -93,6 +98,6 @@ export class ArrayExpression extends AnnotatedExpression {
93
98
  export function isArrayExpression(node: object | undefined): node is ArrayExpression {
94
99
  return node instanceof ArrayExpression
95
100
  }
96
- if (!nodeByType.has(156)) {
97
- nodeByType.set(156, ArrayExpression)
101
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION)) {
102
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION, (peer: KNativePointer) => new ArrayExpression(peer))
98
103
  }
@@ -22,7 +22,6 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
@@ -30,11 +29,12 @@ import {
30
29
  } from "../../reexport-for-generated"
31
30
 
32
31
  import { AnnotationUsage } from "./AnnotationUsage"
32
+ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
33
33
  import { Expression } from "./Expression"
34
34
  import { ScriptFunction } from "./ScriptFunction"
35
35
  import { TypeNode } from "./TypeNode"
36
36
  export class ArrowFunctionExpression extends Expression {
37
- constructor(pointer: KNativePointer) {
37
+ constructor(pointer: KNativePointer) {
38
38
  assertValidPeer(pointer, 0)
39
39
  super(pointer)
40
40
  }
@@ -47,14 +47,14 @@ export class ArrowFunctionExpression extends Expression {
47
47
  static update1ArrowFunctionExpression(original?: ArrowFunctionExpression, other?: ArrowFunctionExpression): ArrowFunctionExpression {
48
48
  return new ArrowFunctionExpression(global.generatedEs2panda._UpdateArrowFunctionExpression1(global.context, passNode(original), passNode(other)))
49
49
  }
50
- get function(): ScriptFunction {
51
- return unpackNonNullableNode(global.generatedEs2panda._ArrowFunctionExpressionFunctionConst(global.context, this.peer))
50
+ get function(): ScriptFunction | undefined {
51
+ return unpackNode(global.generatedEs2panda._ArrowFunctionExpressionFunction(global.context, this.peer))
52
52
  }
53
53
  get createTypeAnnotation(): TypeNode | undefined {
54
54
  return unpackNode(global.generatedEs2panda._ArrowFunctionExpressionCreateTypeAnnotation(global.context, this.peer))
55
55
  }
56
56
  get annotations(): readonly AnnotationUsage[] {
57
- return unpackNodeArray(global.generatedEs2panda._ArrowFunctionExpressionAnnotationsConst(global.context, this.peer))
57
+ return unpackNodeArray(global.generatedEs2panda._ArrowFunctionExpressionAnnotations(global.context, this.peer))
58
58
  }
59
59
  /** @deprecated */
60
60
  setAnnotations(annotations: readonly AnnotationUsage[]): this {
@@ -65,6 +65,6 @@ export class ArrowFunctionExpression extends Expression {
65
65
  export function isArrowFunctionExpression(node: object | undefined): node is ArrowFunctionExpression {
66
66
  return node instanceof ArrowFunctionExpression
67
67
  }
68
- if (!nodeByType.has(0)) {
69
- nodeByType.set(0, ArrowFunctionExpression)
68
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION)) {
69
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION, (peer: KNativePointer) => new ArrowFunctionExpression(peer))
70
70
  }
@@ -22,17 +22,17 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
29
28
  unpackString
30
29
  } from "../../reexport-for-generated"
31
30
 
31
+ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
32
32
  import { Expression } from "./Expression"
33
33
  import { Statement } from "./Statement"
34
34
  export class AssertStatement extends Statement {
35
- constructor(pointer: KNativePointer) {
35
+ constructor(pointer: KNativePointer) {
36
36
  assertValidPeer(pointer, 3)
37
37
  super(pointer)
38
38
  }
@@ -43,7 +43,7 @@ export class AssertStatement extends Statement {
43
43
  return new AssertStatement(global.generatedEs2panda._UpdateAssertStatement(global.context, passNode(original), passNode(test), passNode(second)))
44
44
  }
45
45
  get test(): Expression | undefined {
46
- return unpackNode(global.generatedEs2panda._AssertStatementTestConst(global.context, this.peer))
46
+ return unpackNode(global.generatedEs2panda._AssertStatementTest(global.context, this.peer))
47
47
  }
48
48
  get second(): Expression | undefined {
49
49
  return unpackNode(global.generatedEs2panda._AssertStatementSecondConst(global.context, this.peer))
@@ -52,6 +52,6 @@ export class AssertStatement extends Statement {
52
52
  export function isAssertStatement(node: object | undefined): node is AssertStatement {
53
53
  return node instanceof AssertStatement
54
54
  }
55
- if (!nodeByType.has(3)) {
56
- nodeByType.set(3, AssertStatement)
55
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT)) {
56
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT, (peer: KNativePointer) => new AssertStatement(peer))
57
57
  }
@@ -22,17 +22,18 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
29
28
  unpackString
30
29
  } from "../../reexport-for-generated"
31
30
 
31
+ import { CodeGen } from "./CodeGen"
32
+ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
32
33
  import { Es2pandaTokenType } from "./../Es2pandaEnums"
33
34
  import { Expression } from "./Expression"
34
35
  export class AssignmentExpression extends Expression {
35
- constructor(pointer: KNativePointer) {
36
+ constructor(pointer: KNativePointer) {
36
37
  assertValidPeer(pointer, 158)
37
38
  super(pointer)
38
39
  }
@@ -46,10 +47,10 @@ export class AssignmentExpression extends Expression {
46
47
  return new AssignmentExpression(global.generatedEs2panda._UpdateAssignmentExpression1(global.context, passNode(original), type, passNode(left), passNode(right), assignmentOperator))
47
48
  }
48
49
  get left(): Expression | undefined {
49
- return unpackNode(global.generatedEs2panda._AssignmentExpressionLeftConst(global.context, this.peer))
50
+ return unpackNode(global.generatedEs2panda._AssignmentExpressionLeft(global.context, this.peer))
50
51
  }
51
52
  get right(): Expression | undefined {
52
- return unpackNode(global.generatedEs2panda._AssignmentExpressionRightConst(global.context, this.peer))
53
+ return unpackNode(global.generatedEs2panda._AssignmentExpressionRight(global.context, this.peer))
53
54
  }
54
55
  /** @deprecated */
55
56
  setRight(expr?: Expression): this {
@@ -62,7 +63,7 @@ export class AssignmentExpression extends Expression {
62
63
  return this
63
64
  }
64
65
  get result(): Expression | undefined {
65
- return unpackNode(global.generatedEs2panda._AssignmentExpressionResultConst(global.context, this.peer))
66
+ return unpackNode(global.generatedEs2panda._AssignmentExpressionResult(global.context, this.peer))
66
67
  }
67
68
  get operatorType(): Es2pandaTokenType {
68
69
  return global.generatedEs2panda._AssignmentExpressionOperatorTypeConst(global.context, this.peer)
@@ -86,10 +87,15 @@ export class AssignmentExpression extends Expression {
86
87
  get convertibleToAssignmentPatternRight(): boolean {
87
88
  return global.generatedEs2panda._AssignmentExpressionConvertibleToAssignmentPatternRight(global.context, this.peer)
88
89
  }
90
+ /** @deprecated */
91
+ compilePattern(pg?: CodeGen): this {
92
+ global.generatedEs2panda._AssignmentExpressionCompilePatternConst(global.context, this.peer, passNode(pg))
93
+ return this
94
+ }
89
95
  }
90
96
  export function isAssignmentExpression(node: object | undefined): node is AssignmentExpression {
91
97
  return node instanceof AssignmentExpression
92
98
  }
93
- if (!nodeByType.has(158)) {
94
- nodeByType.set(158, AssignmentExpression)
99
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION)) {
100
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION, (peer: KNativePointer) => new AssignmentExpression(peer))
95
101
  }
@@ -22,7 +22,6 @@ import {
22
22
  unpackNodeArray,
23
23
  assertValidPeer,
24
24
  AstNode,
25
- Es2pandaAstNodeType,
26
25
  KNativePointer,
27
26
  nodeByType,
28
27
  ArktsObject,
@@ -30,7 +29,7 @@ import {
30
29
  } from "../../reexport-for-generated"
31
30
 
32
31
  export class AstDumper extends ArktsObject {
33
- constructor(pointer: KNativePointer) {
32
+ constructor(pointer: KNativePointer) {
34
33
  super(pointer)
35
34
  }
36
35
  static createAstDumper(node: AstNode | undefined, sourceCode: string): AstDumper {
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ import {
17
+ global,
18
+ passNode,
19
+ passNodeArray,
20
+ unpackNonNullableNode,
21
+ unpackNode,
22
+ unpackNodeArray,
23
+ assertValidPeer,
24
+ AstNode,
25
+ KNativePointer,
26
+ nodeByType,
27
+ ArktsObject,
28
+ unpackString
29
+ } from "../../reexport-for-generated"
30
+
31
+ export class AstVerifier extends ArktsObject {
32
+ constructor(pointer: KNativePointer) {
33
+ super(pointer)
34
+ }
35
+ }