@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
@@ -0,0 +1,36 @@
1
+ ## libarkts
2
+
3
+ Wrapper library which provides tsc-like __ArkTS__ compiler API
4
+
5
+ Implemented with koala interop technology
6
+
7
+ ### Prerequisites
8
+
9
+ node >= 18
10
+ meson >= 0.62
11
+
12
+ Having following .npmrc: https://gitee.com/openharmony-sig/arkcompiler_ets_frontend/wikis/npmrc
13
+
14
+ ```
15
+ cd ~/arkcompiler_ets_frontend
16
+ npm i
17
+ cd ./ui2abc/libarkts/
18
+ npm i
19
+ npm run compile
20
+ ```
21
+
22
+ ### Structure
23
+
24
+ - ```compatible``` - __ArkTS__ / __typescript__ plugins
25
+ - ```input``` - code samples to be compiled with __ArkTS__ / __typescript__
26
+ - ```native``` - node module wrapper for __es2panda.so__
27
+ - ```src``` - plugin API sources
28
+ - ```test``` - plugin API tests
29
+
30
+ ### How to run
31
+ ```
32
+ npm run run
33
+ node build/api/es2panda.js --help
34
+ ```
35
+
36
+ Runs __ArkTS__ compiler for __./input/main.sts__ invoking plugins specified in __arktsconfig.json__
@@ -1,47 +1,98 @@
1
1
  {
2
+ "irHack": [
3
+ "AnnotationUsage",
4
+ "ETSFunctionType",
5
+ "ETSUnionType",
6
+ "ETSNullType",
7
+ "ETSUndefinedType",
8
+ ],
2
9
  "ignore": {
3
- "interfaces": {
4
- "es2panda_Impl": [
5
- "*"
6
- ],
7
- "es2panda_SourcePosition": [ // until idl is fixed
8
- "*"
9
- ],
10
- "es2panda_LabelPair": [
11
- "*"
12
- ],
13
- "AnnotationDeclaration": [
14
- "PropertiesPtrConst" // interferes create-to-param matching
15
- ],
16
- "AnnotationUsage": [
17
- "PropertiesPtrConst" // interferes create-to-param matching
18
- ],
19
- "TSInterfaceBody": [
20
- "BodyPtr" // interferes create-to-param matching
21
- ],
22
- "Signature": [
23
- "ProtectionFlagConst", // u8
24
- ],
25
- "ETSReExportDeclaration": [
26
- "Create", // sequence<String>
27
- "Update", // sequence<String>
28
- "GetUserPathsConst" // sequence<String>
29
- ],
30
- "CharLiteral": [
31
- "Create1", // KShort,
32
- "Update1", // KShort
33
- "CharConst", // KShort
34
- ],
35
- "ForUpdateStatement": [ // forbidden naming
36
- "Update"
37
- ],
38
- "CallExpression": [
39
- "Update" // differs from handwritten
40
- ],
41
- "TryStatement": [
42
- "AddFinalizerInsertion" // idl missing const
43
- ],
44
- }
10
+ "full": [
11
+ "es2panda_Impl",
12
+ "es2panda_Config",
13
+ "es2panda_ExternalSource",
14
+ ],
15
+ "partial": [
16
+ {
17
+ interface: "MethodDefinition",
18
+ methods: [
19
+ "GetOverloadInfo", // return type is wrong
20
+ ]
21
+ },
22
+ {
23
+ interface: "AnnotationDeclaration",
24
+ methods: [
25
+ "PropertiesPtrConst" // interfaces create-to-param matching
26
+ ]
27
+ },
28
+ {
29
+ interface: "NumberLiteral",
30
+ methods: [
31
+ "SetInt",
32
+ "SetLong",
33
+ "SetDouble",
34
+ "SetFloat"
35
+ ]
36
+ },
37
+ {
38
+ interface: "AnnotationUsage",
39
+ methods: [
40
+ "PropertiesPtrConst" // interfaces create-to-param matching
41
+ ]
42
+ },
43
+ {
44
+ interface: "TSInterfaceBody",
45
+ methods: [
46
+ "BodyPtr" // interfaces create-to-param matching
47
+ ]
48
+ },
49
+ {
50
+ interface: "Signature",
51
+ methods: [
52
+ "ProtectionFlagConst" // u8
53
+ ]
54
+ },
55
+ {
56
+ interface: "ETSReExportDeclaration",
57
+ methods: [
58
+ "Create", // sequence<String>
59
+ "Update", // sequence<String>
60
+ "GetUserPathsConst" // sequence<String>
61
+ ]
62
+ },
63
+ {
64
+ interface: "CharLiteral",
65
+ methods: [
66
+ "Create1", // KShort,
67
+ "Update1", // KShort
68
+ "CharConst", // KShort
69
+ ]
70
+ },
71
+ {
72
+ interface: "ForUpdateStatement",
73
+ methods: [
74
+ "Update" // forbidden naming
75
+ ]
76
+ },
77
+ {
78
+ interface: "CallExpression",
79
+ methods: [
80
+ "Update" // differs from handwritten
81
+ ]
82
+ },
83
+ {
84
+ interface: "TryStatement",
85
+ methods: [
86
+ "AddFinalizerInsertion" // idl missing const
87
+ ]
88
+ },
89
+ {
90
+ interface: "MemberExpression",
91
+ methods: [
92
+ "SetExtensionAccessorType" // ETSFunction type ambiguity
93
+ ]
94
+ },
95
+ ]
45
96
  },
46
97
  nonNullable: [
47
98
  {
@@ -148,8 +199,26 @@
148
199
  {
149
200
  name: "FunctionConst",
150
201
  types: ["returnType"]
202
+ },
203
+ ]
204
+ },
205
+ {
206
+ name: "ETSFunctionType",
207
+ methods: [
208
+ {
209
+ name: "ReturnTypeConst",
210
+ types: ["returnType"]
211
+ }
212
+ ]
213
+ },
214
+ {
215
+ name: "TSTypeAliasDeclaration",
216
+ methods: [
217
+ {
218
+ name: "TypeAnnotationConst",
219
+ types: ["returnType"]
151
220
  }
152
221
  ]
153
222
  },
154
- ]
155
- }
223
+ ],
224
+ }
@@ -53,6 +53,7 @@ KNativePointer impl_AnnotationAllowedAnnotationsConst(KNativePointer contextPtr,
53
53
  }
54
54
  KOALA_INTEROP_3(AnnotationAllowedAnnotationsConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer)
55
55
 
56
+ /*
56
57
  KNativePointer impl_AstNodeVariableConst(KNativePointer contextPtr, KNativePointer nodePtr)
57
58
  {
58
59
  auto context = reinterpret_cast<es2panda_Context*>(contextPtr);
@@ -61,6 +62,7 @@ KNativePointer impl_AstNodeVariableConst(KNativePointer contextPtr, KNativePoint
61
62
  return GetImpl()->AstNodeVariableConst(context, node);
62
63
  }
63
64
  KOALA_INTEROP_2(AstNodeVariableConst, KNativePointer, KNativePointer, KNativePointer)
65
+ */
64
66
 
65
67
  KNativePointer impl_VariableDeclaration(KNativePointer contextPtr, KNativePointer variablePtr)
66
68
  {
@@ -80,6 +82,7 @@ KNativePointer impl_DeclNode(KNativePointer contextPtr, KNativePointer declPtr)
80
82
  }
81
83
  KOALA_INTEROP_2(DeclNode, KNativePointer, KNativePointer, KNativePointer)
82
84
 
85
+ /*
83
86
  KNativePointer impl_AstNodeScopeConst(KNativePointer contextPtr, KNativePointer nodePtr)
84
87
  {
85
88
  auto context = reinterpret_cast<es2panda_Context*>(contextPtr);
@@ -87,7 +90,7 @@ KNativePointer impl_AstNodeScopeConst(KNativePointer contextPtr, KNativePointer
87
90
  return GetImpl()->AstNodeScopeConst(context, node);
88
91
  }
89
92
  KOALA_INTEROP_2(AstNodeScopeConst, KNativePointer, KNativePointer, KNativePointer)
90
-
93
+ */
91
94
  KNativePointer impl_ScopeSetParent(KNativePointer contextPtr, KNativePointer nodePtr, KNativePointer parentPtr)
92
95
  {
93
96
  auto context = reinterpret_cast<es2panda_Context*>(contextPtr);
@@ -98,6 +101,7 @@ KNativePointer impl_ScopeSetParent(KNativePointer contextPtr, KNativePointer nod
98
101
  }
99
102
  KOALA_INTEROP_3(ScopeSetParent, KNativePointer, KNativePointer, KNativePointer, KNativePointer)
100
103
 
104
+ /*
101
105
  KNativePointer impl_CreateNumberLiteral(KNativePointer contextPtr, KDouble value)
102
106
  {
103
107
  auto context = reinterpret_cast<es2panda_Context*>(contextPtr);
@@ -105,6 +109,7 @@ KNativePointer impl_CreateNumberLiteral(KNativePointer contextPtr, KDouble value
105
109
  return GetImpl()->CreateNumberLiteral(context, value);
106
110
  }
107
111
  KOALA_INTEROP_2(CreateNumberLiteral, KNativePointer, KNativePointer, KDouble)
112
+ */
108
113
 
109
114
  KNativePointer impl_ETSParserCreateExpression(KNativePointer contextPtr, KStringPtr& sourceCodePtr, KInt flagsT)
110
115
  {
@@ -189,6 +194,7 @@ KNativePointer impl_ContextErrorMessage(KNativePointer contextPtr)
189
194
  }
190
195
  KOALA_INTEROP_1(ContextErrorMessage, KNativePointer, KNativePointer)
191
196
 
197
+ /*
192
198
  KNativePointer impl_CallExpressionSignature(KNativePointer context, KNativePointer classInstance)
193
199
  {
194
200
  const auto _context = reinterpret_cast<es2panda_Context*>(context);
@@ -197,7 +203,7 @@ KNativePointer impl_CallExpressionSignature(KNativePointer context, KNativePoint
197
203
  return result;
198
204
  }
199
205
  KOALA_INTEROP_2(CallExpressionSignature, KNativePointer, KNativePointer, KNativePointer)
200
-
206
+ */
201
207
  KNativePointer impl_SignatureFunction(KNativePointer context, KNativePointer classInstance)
202
208
  {
203
209
  const auto _context = reinterpret_cast<es2panda_Context*>(context);
@@ -263,3 +269,65 @@ KBoolean impl_IsETSFunctionType(KNativePointer nodePtr)
263
269
  return GetImpl()->IsETSFunctionType(node);
264
270
  }
265
271
  KOALA_INTEROP_1(IsETSFunctionType, KBoolean, KNativePointer)
272
+
273
+ KNativePointer impl_ETSParserBuildImportDeclaration(KNativePointer context, KInt importKinds, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KNativePointer source, KNativePointer program, KInt importFlag)
274
+ {
275
+ const auto _context = reinterpret_cast<es2panda_Context*>(context);
276
+ const auto _kinds = static_cast<Es2pandaImportKinds>(importKinds);
277
+ const auto _specifiers = reinterpret_cast<es2panda_AstNode**>(specifiers);
278
+ const auto _specifiersSequenceLength = static_cast<size_t>(specifiersSequenceLength);
279
+ const auto _source = reinterpret_cast<es2panda_AstNode*>(source);
280
+ const auto _program = reinterpret_cast<es2panda_Program*>(program);
281
+ const auto _importFlag = static_cast<Es2pandaImportFlags>(importFlag);
282
+
283
+ return GetImpl()->ETSParserBuildImportDeclaration(_context, _kinds, _specifiers, _specifiersSequenceLength, _source, _program, _importFlag);
284
+ }
285
+ KOALA_INTEROP_7(ETSParserBuildImportDeclaration, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KNativePointer, KNativePointer, KInt)
286
+
287
+ void impl_InsertETSImportDeclarationAndParse(KNativePointer context, KNativePointer program, KNativePointer importDeclaration)
288
+ {
289
+ const auto _context = reinterpret_cast<es2panda_Context*>(context);
290
+ const auto _program = reinterpret_cast<es2panda_Program*>(program);
291
+ const auto _import = reinterpret_cast<es2panda_AstNode*>(importDeclaration);
292
+ GetImpl()->InsertETSImportDeclarationAndParse(_context, _program, _import);
293
+ }
294
+ KOALA_INTEROP_V3(InsertETSImportDeclarationAndParse, KNativePointer, KNativePointer, KNativePointer)
295
+
296
+ KNativePointer impl_ETSParserGetImportPathManager(KNativePointer contextPtr)
297
+ {
298
+ auto context = reinterpret_cast<es2panda_Context*>(contextPtr);
299
+ return GetImpl()->ETSParserGetImportPathManager(context);
300
+ }
301
+ KOALA_INTEROP_1(ETSParserGetImportPathManager, KNativePointer, KNativePointer);
302
+
303
+ KNativePointer impl_CreateSourcePosition(KNativePointer context, KInt index, KInt line)
304
+ {
305
+ auto&& _context_ = reinterpret_cast<es2panda_Context *>(context);
306
+ return GetImpl()->CreateSourcePosition(_context_, index, line);
307
+ }
308
+ KOALA_INTEROP_3(CreateSourcePosition, KNativePointer, KNativePointer, KInt, KInt);
309
+
310
+ KInt impl_SourcePositionIndex(KNativePointer context, KNativePointer instance)
311
+ {
312
+ auto&& _context_ = reinterpret_cast<es2panda_Context *>(context);
313
+ auto&& _instance_ = reinterpret_cast<es2panda_SourcePosition *>(instance);
314
+ return GetImpl()->SourcePositionIndex(_context_, _instance_);
315
+ }
316
+ KOALA_INTEROP_2(SourcePositionIndex, KInt, KNativePointer, KNativePointer);
317
+
318
+ KInt impl_SourcePositionLine(KNativePointer context, KNativePointer instance)
319
+ {
320
+ auto&& _context_ = reinterpret_cast<es2panda_Context *>(context);
321
+ auto&& _instance_ = reinterpret_cast<es2panda_SourcePosition *>(instance);
322
+ return GetImpl()->SourcePositionLine(_context_, _instance_);
323
+ }
324
+ KOALA_INTEROP_2(SourcePositionLine, KInt, KNativePointer, KNativePointer);
325
+
326
+ KNativePointer impl_CreateSourceRange(KNativePointer context, KNativePointer start, KNativePointer end)
327
+ {
328
+ auto&& _context_ = reinterpret_cast<es2panda_Context *>(context);
329
+ auto&& _start_ = reinterpret_cast<es2panda_SourcePosition *>(start);
330
+ auto&& _end_ = reinterpret_cast<es2panda_SourcePosition *>(end);
331
+ return GetImpl()->CreateSourceRange(_context_, _start_, _end_);
332
+ }
333
+ KOALA_INTEROP_3(CreateSourceRange, KNativePointer, KNativePointer, KNativePointer, KNativePointer);