@idlizer/arktscgen 2.1.2 → 2.1.7

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 (269) 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/meson.build +13 -0
  4. package/build/libarkts-copy/native/meson_options.txt +13 -0
  5. package/build/libarkts-copy/native/src/bridges.cc +78 -10
  6. package/build/libarkts-copy/native/src/common.cc +56 -8
  7. package/build/libarkts-copy/native/src/common.h +48 -0
  8. package/build/libarkts-copy/native/src/generated/bridges.cc +825 -325
  9. package/build/libarkts-copy/package.json +67 -49
  10. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +42 -4
  11. package/build/libarkts-copy/src/InteropNativeModule.ts +5 -2
  12. package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +50 -0
  13. package/build/libarkts-copy/src/arkts-api/CheckedBackFilter.ts +53 -0
  14. package/build/libarkts-copy/src/arkts-api/SetBaseOverloads.ts +51 -0
  15. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +8 -6
  16. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +95 -117
  17. package/build/libarkts-copy/src/arkts-api/index.ts +6 -1
  18. package/build/libarkts-copy/src/arkts-api/node-cache.ts +35 -0
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +42 -0
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrowFunctionExpression.ts +49 -0
  21. package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +50 -0
  22. package/build/libarkts-copy/src/arkts-api/node-utilities/{createCallExpression.ts → CallExpression.ts} +27 -4
  23. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +73 -0
  24. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +64 -0
  25. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +65 -0
  26. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +69 -0
  27. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +60 -0
  28. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +31 -0
  29. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +31 -0
  30. package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +41 -0
  31. package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +75 -0
  32. package/build/libarkts-copy/src/arkts-api/node-utilities/{createNumberLiteral.ts → NumberLiteral.ts} +15 -0
  33. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +34 -0
  34. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +99 -0
  35. package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +81 -0
  36. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +68 -0
  37. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +39 -0
  38. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +36 -0
  39. package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +44 -0
  40. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclaration.ts +54 -0
  41. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +37 -0
  42. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +16 -15
  43. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +1 -2
  44. package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +30 -0
  45. package/build/libarkts-copy/src/arkts-api/peers/Program.ts +7 -5
  46. package/build/libarkts-copy/src/arkts-api/peers/SourcePosition.ts +38 -0
  47. package/build/libarkts-copy/src/arkts-api/plugins.ts +48 -0
  48. package/build/libarkts-copy/src/arkts-api/static/global.ts +8 -2
  49. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +40 -0
  50. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +18 -14
  51. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +76 -12
  52. package/build/libarkts-copy/src/arkts-api/visitor.ts +324 -42
  53. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +504 -458
  54. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +225 -75
  55. package/build/libarkts-copy/src/generated/factory.ts +21 -43
  56. package/build/libarkts-copy/src/generated/index.ts +24 -3
  57. package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +1 -2
  58. package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +1 -2
  59. package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +1 -2
  60. package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +7 -7
  61. package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +12 -12
  62. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +10 -5
  63. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +7 -7
  64. package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +5 -5
  65. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +13 -7
  66. package/build/libarkts-copy/src/generated/peers/AstDumper.ts +1 -2
  67. package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +35 -0
  68. package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +35 -0
  69. package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +4 -4
  70. package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +4 -4
  71. package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +14 -7
  72. package/build/libarkts-copy/src/generated/peers/BindingProps.ts +35 -0
  73. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +5 -5
  74. package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +15 -5
  75. package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +4 -4
  76. package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +8 -5
  77. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +8 -8
  78. package/build/libarkts-copy/src/generated/peers/CatchClause.ts +6 -6
  79. package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +12 -5
  80. package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +4 -4
  81. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +5 -5
  82. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +30 -15
  83. package/build/libarkts-copy/src/generated/peers/ClassElement.ts +7 -8
  84. package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +4 -4
  85. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +21 -5
  86. package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +5 -5
  87. package/build/libarkts-copy/src/generated/peers/CodeGen.ts +35 -0
  88. package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +7 -7
  89. package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +8 -5
  90. package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +4 -4
  91. package/build/libarkts-copy/src/generated/peers/Declaration.ts +35 -0
  92. package/build/libarkts-copy/src/generated/peers/Decorator.ts +4 -4
  93. package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +4 -4
  94. package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +6 -6
  95. package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +35 -0
  96. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +4 -4
  97. package/build/libarkts-copy/src/generated/peers/ETSDynamicFunctionType.ts +1 -2
  98. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +15 -15
  99. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +26 -17
  100. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +53 -0
  101. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +6 -6
  102. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +11 -6
  103. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +5 -5
  104. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +11 -6
  105. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +6 -6
  106. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +4 -4
  107. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +10 -10
  108. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +4 -4
  109. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +5 -5
  110. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +50 -0
  111. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +4 -4
  112. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +5 -5
  113. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +5 -5
  114. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +8 -8
  115. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +6 -6
  116. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +7 -7
  117. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +5 -5
  118. package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +4 -4
  119. package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +35 -0
  120. package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +4 -4
  121. package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +5 -5
  122. package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +4 -4
  123. package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +4 -4
  124. package/build/libarkts-copy/src/generated/peers/Expression.ts +4 -5
  125. package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +6 -6
  126. package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +7 -7
  127. package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +7 -7
  128. package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +7 -7
  129. package/build/libarkts-copy/src/generated/peers/FunctionDecl.ts +1 -2
  130. package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +8 -8
  131. package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +5 -5
  132. package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +6 -7
  133. package/build/libarkts-copy/src/generated/peers/IRNode.ts +35 -0
  134. package/build/libarkts-copy/src/generated/peers/Identifier.ts +5 -5
  135. package/build/libarkts-copy/src/generated/peers/IfStatement.ts +9 -9
  136. package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +10 -10
  137. package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +5 -5
  138. package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +5 -5
  139. package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +5 -5
  140. package/build/libarkts-copy/src/generated/peers/ImportSource.ts +1 -15
  141. package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +14 -6
  142. package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +35 -0
  143. package/build/libarkts-copy/src/generated/peers/InterfaceDecl.ts +1 -2
  144. package/build/libarkts-copy/src/generated/peers/LabelPair.ts +35 -0
  145. package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +6 -6
  146. package/build/libarkts-copy/src/generated/peers/Literal.ts +1 -2
  147. package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +1 -2
  148. package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +1 -2
  149. package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +24 -8
  150. package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +4 -4
  151. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +25 -8
  152. package/build/libarkts-copy/src/generated/peers/NamedType.ts +4 -4
  153. package/build/libarkts-copy/src/generated/peers/NewExpression.ts +4 -4
  154. package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +4 -4
  155. package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +19 -4
  156. package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +35 -0
  157. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +4 -4
  158. package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +4 -4
  159. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +4 -4
  160. package/build/libarkts-copy/src/generated/peers/OverloadInfo.ts +35 -0
  161. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +4 -4
  162. package/build/libarkts-copy/src/generated/peers/Property.ts +6 -6
  163. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +4 -4
  164. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +8 -5
  165. package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +35 -0
  166. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +16 -11
  167. package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +35 -0
  168. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +5 -5
  169. package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +35 -0
  170. package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +35 -0
  171. package/build/libarkts-copy/src/generated/peers/SourceRange.ts +35 -0
  172. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +5 -5
  173. package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +1 -2
  174. package/build/libarkts-copy/src/generated/peers/Statement.ts +1 -2
  175. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +4 -4
  176. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +4 -4
  177. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +5 -5
  178. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +6 -6
  179. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +4 -4
  180. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +4 -4
  181. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +5 -5
  182. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +4 -4
  183. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +4 -4
  184. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +5 -5
  185. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +4 -4
  186. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +6 -6
  187. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +5 -5
  188. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +6 -6
  189. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +4 -4
  190. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +6 -6
  191. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +4 -4
  192. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +4 -4
  193. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +4 -4
  194. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +4 -4
  195. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +4 -4
  196. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +5 -5
  197. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +10 -10
  198. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +5 -5
  199. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +4 -4
  200. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +4 -4
  201. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +4 -4
  202. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +7 -7
  203. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +4 -4
  204. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +4 -4
  205. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +5 -5
  206. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +4 -4
  207. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +5 -5
  208. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +4 -4
  209. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +4 -4
  210. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +4 -4
  211. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +4 -4
  212. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +4 -4
  213. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +5 -5
  214. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +7 -7
  215. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +6 -6
  216. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +4 -4
  217. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +4 -4
  218. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +4 -4
  219. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +8 -8
  220. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +4 -4
  221. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +4 -4
  222. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +4 -4
  223. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +7 -7
  224. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +4 -4
  225. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +4 -4
  226. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +4 -4
  227. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +4 -4
  228. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +4 -4
  229. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +4 -4
  230. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +4 -4
  231. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +4 -4
  232. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +4 -4
  233. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +4 -4
  234. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +4 -4
  235. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +4 -4
  236. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +4 -4
  237. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +4 -4
  238. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +10 -6
  239. package/build/libarkts-copy/src/generated/peers/TypeNode.ts +2 -3
  240. package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +1 -2
  241. package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +1 -2
  242. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +4 -4
  243. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +5 -5
  244. package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +4 -4
  245. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +5 -5
  246. package/build/libarkts-copy/src/generated/peers/VReg.ts +35 -0
  247. package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +4 -4
  248. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +5 -5
  249. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +7 -7
  250. package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +35 -0
  251. package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +35 -0
  252. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +6 -6
  253. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +4 -4
  254. package/build/libarkts-copy/src/index.ts +35 -0
  255. package/build/libarkts-copy/src/reexport-for-generated.ts +1 -1
  256. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +15 -0
  257. package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +15 -0
  258. package/build/libarkts-copy/src/ts-api/types.ts +15 -0
  259. package/build/libarkts-copy/src/utils.ts +301 -9
  260. package/build/libarkts-copy/tsconfig.json +5 -4
  261. package/lib/index.js +2861 -1209
  262. package/package.json +6 -6
  263. package/templates/factory.ts +0 -1
  264. package/templates/peer.ts +0 -1
  265. package/build/libarkts-copy/src/Es2pandaEnums.ts +0 -183
  266. package/build/libarkts-copy/src/arkts-api/node-utilities/createScriptFunction.ts +0 -55
  267. package/build/libarkts-copy/src/es2panda.ts +0 -277
  268. package/build/libarkts-copy/src/generated/node-map.ts +0 -182
  269. package/build/libarkts-copy/src/generated/peers/ETSLaunchExpression.ts +0 -57
@@ -22,18 +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 { Es2pandaAstNodeType } from "./../Es2pandaEnums"
32
32
  import { Es2pandaPropertyKind } from "./../Es2pandaEnums"
33
33
  import { Expression } from "./Expression"
34
34
  import { ValidationInfo } from "./ValidationInfo"
35
35
  export class Property extends Expression {
36
- constructor(pointer: KNativePointer) {
36
+ constructor(pointer: KNativePointer) {
37
37
  assertValidPeer(pointer, 55)
38
38
  super(pointer)
39
39
  }
@@ -47,10 +47,10 @@ export class Property extends Expression {
47
47
  return new Property(global.generatedEs2panda._UpdateProperty1(global.context, passNode(original), kind, passNode(key), passNode(value), isMethod, isComputed))
48
48
  }
49
49
  get key(): Expression | undefined {
50
- return unpackNode(global.generatedEs2panda._PropertyKeyConst(global.context, this.peer))
50
+ return unpackNode(global.generatedEs2panda._PropertyKey(global.context, this.peer))
51
51
  }
52
52
  get value(): Expression | undefined {
53
- return unpackNode(global.generatedEs2panda._PropertyValueConst(global.context, this.peer))
53
+ return unpackNode(global.generatedEs2panda._PropertyValue(global.context, this.peer))
54
54
  }
55
55
  get kind(): Es2pandaPropertyKind {
56
56
  return global.generatedEs2panda._PropertyKindConst(global.context, this.peer)
@@ -77,6 +77,6 @@ export class Property extends Expression {
77
77
  export function isProperty(node: object | undefined): node is Property {
78
78
  return node instanceof Property
79
79
  }
80
- if (!nodeByType.has(55)) {
81
- nodeByType.set(55, Property)
80
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY)) {
81
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY, (peer: KNativePointer) => new Property(peer))
82
82
  }
@@ -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 { Es2pandaRegExpFlags } from "./../Es2pandaEnums"
33
33
  import { Literal } from "./Literal"
34
34
  export class RegExpLiteral extends Literal {
35
- constructor(pointer: KNativePointer) {
35
+ constructor(pointer: KNativePointer) {
36
36
  assertValidPeer(pointer, 56)
37
37
  super(pointer)
38
38
  }
@@ -52,6 +52,6 @@ export class RegExpLiteral extends Literal {
52
52
  export function isRegExpLiteral(node: object | undefined): node is RegExpLiteral {
53
53
  return node instanceof RegExpLiteral
54
54
  }
55
- if (!nodeByType.has(56)) {
56
- nodeByType.set(56, RegExpLiteral)
55
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL)) {
56
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL, (peer: KNativePointer) => new RegExpLiteral(peer))
57
57
  }
@@ -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 ReturnStatement extends Statement {
35
- constructor(pointer: KNativePointer) {
35
+ constructor(pointer: KNativePointer) {
36
36
  assertValidPeer(pointer, 58)
37
37
  super(pointer)
38
38
  }
@@ -46,17 +46,20 @@ export class ReturnStatement extends Statement {
46
46
  return new ReturnStatement(global.generatedEs2panda._UpdateReturnStatement1(global.context, passNode(original), passNode(argument)))
47
47
  }
48
48
  get argument(): Expression | undefined {
49
- return unpackNode(global.generatedEs2panda._ReturnStatementArgumentConst(global.context, this.peer))
49
+ return unpackNode(global.generatedEs2panda._ReturnStatementArgument(global.context, this.peer))
50
50
  }
51
51
  /** @deprecated */
52
52
  setArgument(arg?: Expression): this {
53
53
  global.generatedEs2panda._ReturnStatementSetArgument(global.context, this.peer, passNode(arg))
54
54
  return this
55
55
  }
56
+ get isAsyncImplReturn(): boolean {
57
+ return global.generatedEs2panda._ReturnStatementIsAsyncImplReturnConst(global.context, this.peer)
58
+ }
56
59
  }
57
60
  export function isReturnStatement(node: object | undefined): node is ReturnStatement {
58
61
  return node instanceof ReturnStatement
59
62
  }
60
- if (!nodeByType.has(58)) {
61
- nodeByType.set(58, ReturnStatement)
63
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT)) {
64
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT, (peer: KNativePointer) => new ReturnStatement(peer))
62
65
  }
@@ -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 ScopeFindResult extends ArktsObject {
32
+ constructor(pointer: KNativePointer) {
33
+ super(pointer)
34
+ }
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,
@@ -30,6 +29,7 @@ import {
30
29
  } from "../../reexport-for-generated"
31
30
 
32
31
  import { AnnotationUsage } from "./AnnotationUsage"
32
+ import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
33
33
  import { Es2pandaModifierFlags } from "./../Es2pandaEnums"
34
34
  import { Es2pandaScriptFunctionFlags } from "./../Es2pandaEnums"
35
35
  import { Expression } from "./Expression"
@@ -39,7 +39,7 @@ import { ReturnStatement } from "./ReturnStatement"
39
39
  import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration"
40
40
  import { TypeNode } from "./TypeNode"
41
41
  export class ScriptFunction extends AstNode {
42
- constructor(pointer: KNativePointer) {
42
+ constructor(pointer: KNativePointer) {
43
43
  assertValidPeer(pointer, 59)
44
44
  super(pointer)
45
45
  }
@@ -50,19 +50,19 @@ export class ScriptFunction extends AstNode {
50
50
  return new ScriptFunction(global.generatedEs2panda._UpdateScriptFunction(global.context, passNode(original), passNode(databody), passNode(datasignature), datafuncFlags, dataflags))
51
51
  }
52
52
  get id(): Identifier | undefined {
53
- return unpackNode(global.generatedEs2panda._ScriptFunctionIdConst(global.context, this.peer))
53
+ return unpackNode(global.generatedEs2panda._ScriptFunctionId(global.context, this.peer))
54
54
  }
55
55
  get params(): readonly Expression[] {
56
- return unpackNodeArray(global.generatedEs2panda._ScriptFunctionParamsConst(global.context, this.peer))
56
+ return unpackNodeArray(global.generatedEs2panda._ScriptFunctionParams(global.context, this.peer))
57
57
  }
58
58
  get returnStatements(): readonly ReturnStatement[] {
59
- return unpackNodeArray(global.generatedEs2panda._ScriptFunctionReturnStatementsConst(global.context, this.peer))
59
+ return unpackNodeArray(global.generatedEs2panda._ScriptFunctionReturnStatements(global.context, this.peer))
60
60
  }
61
61
  get typeParams(): TSTypeParameterDeclaration | undefined {
62
- return unpackNode(global.generatedEs2panda._ScriptFunctionTypeParamsConst(global.context, this.peer))
62
+ return unpackNode(global.generatedEs2panda._ScriptFunctionTypeParams(global.context, this.peer))
63
63
  }
64
64
  get body(): AstNode | undefined {
65
- return unpackNode(global.generatedEs2panda._ScriptFunctionBodyConst(global.context, this.peer))
65
+ return unpackNode(global.generatedEs2panda._ScriptFunctionBody(global.context, this.peer))
66
66
  }
67
67
  /** @deprecated */
68
68
  addReturnStatement(returnStatement?: ReturnStatement): this {
@@ -75,7 +75,7 @@ export class ScriptFunction extends AstNode {
75
75
  return this
76
76
  }
77
77
  get returnTypeAnnotation(): TypeNode | undefined {
78
- return unpackNode(global.generatedEs2panda._ScriptFunctionReturnTypeAnnotationConst(global.context, this.peer))
78
+ return unpackNode(global.generatedEs2panda._ScriptFunctionReturnTypeAnnotation(global.context, this.peer))
79
79
  }
80
80
  /** @deprecated */
81
81
  setReturnTypeAnnotation(node?: TypeNode): this {
@@ -177,6 +177,11 @@ export class ScriptFunction extends AstNode {
177
177
  return this
178
178
  }
179
179
  /** @deprecated */
180
+ clearFlag(flags: Es2pandaScriptFunctionFlags): this {
181
+ global.generatedEs2panda._ScriptFunctionClearFlag(global.context, this.peer, flags)
182
+ return this
183
+ }
184
+ /** @deprecated */
180
185
  addModifier(flags: Es2pandaModifierFlags): this {
181
186
  global.generatedEs2panda._ScriptFunctionAddModifier(global.context, this.peer, flags)
182
187
  return this
@@ -185,7 +190,7 @@ export class ScriptFunction extends AstNode {
185
190
  return global.generatedEs2panda._ScriptFunctionFormalParamsLengthConst(global.context, this.peer)
186
191
  }
187
192
  get annotations(): readonly AnnotationUsage[] {
188
- return unpackNodeArray(global.generatedEs2panda._ScriptFunctionAnnotationsConst(global.context, this.peer))
193
+ return unpackNodeArray(global.generatedEs2panda._ScriptFunctionAnnotations(global.context, this.peer))
189
194
  }
190
195
  /** @deprecated */
191
196
  setAnnotations(annotations: readonly AnnotationUsage[]): this {
@@ -196,6 +201,6 @@ export class ScriptFunction extends AstNode {
196
201
  export function isScriptFunction(node: object | undefined): node is ScriptFunction {
197
202
  return node instanceof ScriptFunction
198
203
  }
199
- if (!nodeByType.has(59)) {
200
- nodeByType.set(59, ScriptFunction)
204
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION)) {
205
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION, (peer: KNativePointer) => new ScriptFunction(peer))
201
206
  }
@@ -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 ScriptFunctionData extends ArktsObject {
32
+ constructor(pointer: KNativePointer) {
33
+ super(pointer)
34
+ }
35
+ }
@@ -22,16 +22,16 @@ 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
  export class SequenceExpression extends Expression {
34
- constructor(pointer: KNativePointer) {
34
+ constructor(pointer: KNativePointer) {
35
35
  assertValidPeer(pointer, 60)
36
36
  super(pointer)
37
37
  }
@@ -42,12 +42,12 @@ export class SequenceExpression extends Expression {
42
42
  return new SequenceExpression(global.generatedEs2panda._UpdateSequenceExpression(global.context, passNode(original), passNodeArray(sequence_arg), sequence_arg.length))
43
43
  }
44
44
  get sequence(): readonly Expression[] {
45
- return unpackNodeArray(global.generatedEs2panda._SequenceExpressionSequenceConst(global.context, this.peer))
45
+ return unpackNodeArray(global.generatedEs2panda._SequenceExpressionSequence(global.context, this.peer))
46
46
  }
47
47
  }
48
48
  export function isSequenceExpression(node: object | undefined): node is SequenceExpression {
49
49
  return node instanceof SequenceExpression
50
50
  }
51
- if (!nodeByType.has(60)) {
52
- nodeByType.set(60, SequenceExpression)
51
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION)) {
52
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION, (peer: KNativePointer) => new SequenceExpression(peer))
53
53
  }
@@ -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 SignatureInfo extends ArktsObject {
32
+ constructor(pointer: KNativePointer) {
33
+ super(pointer)
34
+ }
35
+ }
@@ -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 SourcePosition extends ArktsObject {
32
+ constructor(pointer: KNativePointer) {
33
+ super(pointer)
34
+ }
35
+ }
@@ -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 SourceRange extends ArktsObject {
32
+ constructor(pointer: KNativePointer) {
33
+ super(pointer)
34
+ }
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,
@@ -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 SpreadElement extends AnnotatedExpression {
38
- constructor(pointer: KNativePointer) {
38
+ constructor(pointer: KNativePointer) {
39
39
  assertValidPeer(pointer, 162)
40
40
  super(pointer)
41
41
  }
@@ -46,7 +46,7 @@ export class SpreadElement extends AnnotatedExpression {
46
46
  return new SpreadElement(global.generatedEs2panda._UpdateSpreadElement(global.context, passNode(original), nodeType, passNode(argument)))
47
47
  }
48
48
  get argument(): Expression | undefined {
49
- return unpackNode(global.generatedEs2panda._SpreadElementArgumentConst(global.context, this.peer))
49
+ return unpackNode(global.generatedEs2panda._SpreadElementArgument(global.context, this.peer))
50
50
  }
51
51
  get isOptional(): boolean {
52
52
  return global.generatedEs2panda._SpreadElementIsOptionalConst(global.context, this.peer)
@@ -74,6 +74,6 @@ export class SpreadElement extends AnnotatedExpression {
74
74
  export function isSpreadElement(node: object | undefined): node is SpreadElement {
75
75
  return node instanceof SpreadElement
76
76
  }
77
- if (!nodeByType.has(162)) {
78
- nodeByType.set(162, SpreadElement)
77
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SPREAD_ELEMENT)) {
78
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SPREAD_ELEMENT, (peer: KNativePointer) => new SpreadElement(peer))
79
79
  }
@@ -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 SrcDumper extends ArktsObject {
33
- constructor(pointer: KNativePointer) {
32
+ constructor(pointer: KNativePointer) {
34
33
  super(pointer)
35
34
  }
36
35
  static createSrcDumper(node?: AstNode): SrcDumper {
@@ -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 Statement extends AstNode {
33
- constructor(pointer: KNativePointer) {
32
+ constructor(pointer: KNativePointer) {
34
33
  super(pointer)
35
34
  }
36
35
  }
@@ -22,16 +22,16 @@ 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 { Literal } from "./Literal"
33
33
  export class StringLiteral extends Literal {
34
- constructor(pointer: KNativePointer) {
34
+ constructor(pointer: KNativePointer) {
35
35
  assertValidPeer(pointer, 61)
36
36
  super(pointer)
37
37
  }
@@ -51,6 +51,6 @@ export class StringLiteral extends Literal {
51
51
  export function isStringLiteral(node: object | undefined): node is StringLiteral {
52
52
  return node instanceof StringLiteral
53
53
  }
54
- if (!nodeByType.has(61)) {
55
- nodeByType.set(61, StringLiteral)
54
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL)) {
55
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL, (peer: KNativePointer) => new StringLiteral(peer))
56
56
  }
@@ -22,16 +22,16 @@ 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
  export class SuperExpression extends Expression {
34
- constructor(pointer: KNativePointer) {
34
+ constructor(pointer: KNativePointer) {
35
35
  assertValidPeer(pointer, 82)
36
36
  super(pointer)
37
37
  }
@@ -45,6 +45,6 @@ export class SuperExpression extends Expression {
45
45
  export function isSuperExpression(node: object | undefined): node is SuperExpression {
46
46
  return node instanceof SuperExpression
47
47
  }
48
- if (!nodeByType.has(82)) {
49
- nodeByType.set(82, SuperExpression)
48
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION)) {
49
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION, (peer: KNativePointer) => new SuperExpression(peer))
50
50
  }
@@ -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 SwitchCaseStatement extends Statement {
35
- constructor(pointer: KNativePointer) {
35
+ constructor(pointer: KNativePointer) {
36
36
  assertValidPeer(pointer, 84)
37
37
  super(pointer)
38
38
  }
@@ -43,7 +43,7 @@ export class SwitchCaseStatement extends Statement {
43
43
  return new SwitchCaseStatement(global.generatedEs2panda._UpdateSwitchCaseStatement(global.context, passNode(original), passNode(test), passNodeArray(consequent), consequent.length))
44
44
  }
45
45
  get test(): Expression | undefined {
46
- return unpackNode(global.generatedEs2panda._SwitchCaseStatementTestConst(global.context, this.peer))
46
+ return unpackNode(global.generatedEs2panda._SwitchCaseStatementTest(global.context, this.peer))
47
47
  }
48
48
  /** @deprecated */
49
49
  setTest(test?: Expression): this {
@@ -57,6 +57,6 @@ export class SwitchCaseStatement extends Statement {
57
57
  export function isSwitchCaseStatement(node: object | undefined): node is SwitchCaseStatement {
58
58
  return node instanceof SwitchCaseStatement
59
59
  }
60
- if (!nodeByType.has(84)) {
61
- nodeByType.set(84, SwitchCaseStatement)
60
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT)) {
61
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT, (peer: KNativePointer) => new SwitchCaseStatement(peer))
62
62
  }
@@ -22,18 +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 { Es2pandaAstNodeType } from "./../Es2pandaEnums"
32
32
  import { Expression } from "./Expression"
33
33
  import { Statement } from "./Statement"
34
34
  import { SwitchCaseStatement } from "./SwitchCaseStatement"
35
35
  export class SwitchStatement extends Statement {
36
- constructor(pointer: KNativePointer) {
36
+ constructor(pointer: KNativePointer) {
37
37
  assertValidPeer(pointer, 85)
38
38
  super(pointer)
39
39
  }
@@ -44,7 +44,7 @@ export class SwitchStatement extends Statement {
44
44
  return new SwitchStatement(global.generatedEs2panda._UpdateSwitchStatement(global.context, passNode(original), passNode(discriminant), passNodeArray(cases), cases.length))
45
45
  }
46
46
  get discriminant(): Expression | undefined {
47
- return unpackNode(global.generatedEs2panda._SwitchStatementDiscriminantConst(global.context, this.peer))
47
+ return unpackNode(global.generatedEs2panda._SwitchStatementDiscriminant(global.context, this.peer))
48
48
  }
49
49
  /** @deprecated */
50
50
  setDiscriminant(discriminant?: Expression): this {
@@ -52,12 +52,12 @@ export class SwitchStatement extends Statement {
52
52
  return this
53
53
  }
54
54
  get cases(): readonly SwitchCaseStatement[] {
55
- return unpackNodeArray(global.generatedEs2panda._SwitchStatementCasesConst(global.context, this.peer))
55
+ return unpackNodeArray(global.generatedEs2panda._SwitchStatementCases(global.context, this.peer))
56
56
  }
57
57
  }
58
58
  export function isSwitchStatement(node: object | undefined): node is SwitchStatement {
59
59
  return node instanceof SwitchStatement
60
60
  }
61
- if (!nodeByType.has(85)) {
62
- nodeByType.set(85, SwitchStatement)
61
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT)) {
62
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT, (peer: KNativePointer) => new SwitchStatement(peer))
63
63
  }
@@ -22,16 +22,16 @@ 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 { TypeNode } from "./TypeNode"
33
33
  export class TSAnyKeyword extends TypeNode {
34
- constructor(pointer: KNativePointer) {
34
+ constructor(pointer: KNativePointer) {
35
35
  assertValidPeer(pointer, 90)
36
36
  super(pointer)
37
37
  }
@@ -45,6 +45,6 @@ export class TSAnyKeyword extends TypeNode {
45
45
  export function isTSAnyKeyword(node: object | undefined): node is TSAnyKeyword {
46
46
  return node instanceof TSAnyKeyword
47
47
  }
48
- if (!nodeByType.has(90)) {
49
- nodeByType.set(90, TSAnyKeyword)
48
+ if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD)) {
49
+ nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD, (peer: KNativePointer) => new TSAnyKeyword(peer))
50
50
  }