@idlizer/arktscgen 2.1.10-arktscgen-4 → 2.1.10-arktscgen-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 (283) hide show
  1. package/build/libarkts-copy/native/meson.build +1 -1
  2. package/build/libarkts-copy/native/src/bridges.cc +72 -115
  3. package/build/libarkts-copy/native/src/common.cc +225 -84
  4. package/build/libarkts-copy/native/src/common.h +22 -22
  5. package/build/libarkts-copy/native/src/memoryTracker.cc +30 -37
  6. package/build/libarkts-copy/native/src/memoryTracker.h +5 -5
  7. package/build/libarkts-copy/package.json +21 -17
  8. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +176 -100
  9. package/build/libarkts-copy/src/InteropNativeModule.ts +18 -15
  10. package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +17 -18
  11. package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +31 -30
  12. package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +20 -17
  13. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +12 -12
  14. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +38 -29
  15. package/build/libarkts-copy/src/arkts-api/index.ts +24 -24
  16. package/build/libarkts-copy/src/arkts-api/node-cache.ts +12 -12
  17. package/build/libarkts-copy/src/arkts-api/node-utilities/ArkTsConfig.ts +8 -8
  18. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +9 -21
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +12 -14
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +5 -5
  21. package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +26 -24
  22. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +62 -32
  23. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +14 -13
  24. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +24 -21
  25. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +10 -12
  26. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +14 -18
  27. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +15 -16
  28. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +5 -8
  29. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +6 -12
  30. package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +12 -11
  31. package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +14 -33
  32. package/build/libarkts-copy/src/arkts-api/node-utilities/NumberLiteral.ts +12 -23
  33. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +17 -21
  34. package/build/libarkts-copy/src/arkts-api/node-utilities/OpaqueTypeNode.ts +9 -8
  35. package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +21 -16
  36. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +52 -53
  37. package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +22 -32
  38. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +12 -14
  39. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +10 -12
  40. package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +10 -9
  41. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +10 -12
  42. package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +8 -8
  43. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +53 -49
  44. package/build/libarkts-copy/src/arkts-api/peers/Config.ts +17 -24
  45. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +29 -37
  46. package/build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts +5 -6
  47. package/build/libarkts-copy/src/arkts-api/peers/ExternalSource.ts +9 -9
  48. package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +6 -8
  49. package/build/libarkts-copy/src/arkts-api/peers/Options.ts +8 -8
  50. package/build/libarkts-copy/src/arkts-api/plugins.ts +98 -30
  51. package/build/libarkts-copy/src/arkts-api/static/global.ts +35 -36
  52. package/build/libarkts-copy/src/arkts-api/static/globalUtils.ts +5 -5
  53. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +107 -91
  54. package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +54 -37
  55. package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +86 -69
  56. package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +39 -23
  57. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +73 -61
  58. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +220 -173
  59. package/build/libarkts-copy/src/arkts-api/visitor.ts +606 -742
  60. package/build/libarkts-copy/src/arkts-api/wrapper-compat.ts +8 -8
  61. package/build/libarkts-copy/src/checkSdk.ts +15 -18
  62. package/build/libarkts-copy/src/index.ts +29 -29
  63. package/build/libarkts-copy/src/plugin-utils.ts +52 -40
  64. package/build/libarkts-copy/src/reexport-for-generated.ts +11 -10
  65. package/build/libarkts-copy/src/tracer.ts +75 -69
  66. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +134 -274
  67. package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +23 -23
  68. package/build/libarkts-copy/src/ts-api/index.ts +27 -35
  69. package/build/libarkts-copy/src/ts-api/static/enums.ts +3 -3
  70. package/build/libarkts-copy/src/ts-api/types.ts +535 -395
  71. package/build/libarkts-copy/src/ts-api/utilities/private.ts +115 -112
  72. package/build/libarkts-copy/src/ts-api/utilities/public.ts +18 -18
  73. package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +33 -49
  74. package/build/libarkts-copy/src/utils.ts +97 -70
  75. package/build/libarkts-copy/tsconfig.json +3 -2
  76. package/lib/index.js +172 -77
  77. package/package.json +51 -52
  78. package/templates/Es2pandaNativeModule.ts +1 -0
  79. package/templates/peer.ts +1 -0
  80. package/build/libarkts-copy/native/src/generated/bridges.cc +0 -16375
  81. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +0 -1344
  82. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +0 -5192
  83. package/build/libarkts-copy/src/generated/factory.ts +0 -1285
  84. package/build/libarkts-copy/src/generated/index.ts +0 -222
  85. package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -44
  86. package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -54
  87. package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -45
  88. package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +0 -165
  89. package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +0 -84
  90. package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +0 -73
  91. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -109
  92. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +0 -119
  93. package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -65
  94. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -111
  95. package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -49
  96. package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -40
  97. package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -40
  98. package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -61
  99. package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -61
  100. package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -110
  101. package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -40
  102. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -72
  103. package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -94
  104. package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -61
  105. package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +0 -78
  106. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +0 -129
  107. package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -74
  108. package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -68
  109. package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -58
  110. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +0 -76
  111. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +0 -365
  112. package/build/libarkts-copy/src/generated/peers/ClassElement.ts +0 -76
  113. package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +0 -62
  114. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +0 -137
  115. package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +0 -66
  116. package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -40
  117. package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -82
  118. package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +0 -78
  119. package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -58
  120. package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -40
  121. package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -62
  122. package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -40
  123. package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -60
  124. package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -66
  125. package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -40
  126. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -62
  127. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +0 -102
  128. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -90
  129. package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -69
  130. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -61
  131. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +0 -129
  132. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -75
  133. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -79
  134. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -75
  135. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -58
  136. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -59
  137. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +0 -189
  138. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -62
  139. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +0 -55
  140. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -58
  141. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -59
  142. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -89
  143. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +0 -66
  144. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +0 -78
  145. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -58
  146. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -75
  147. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +0 -63
  148. package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -66
  149. package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -40
  150. package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +0 -66
  151. package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -64
  152. package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +0 -94
  153. package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +0 -82
  154. package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -84
  155. package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -67
  156. package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -69
  157. package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -72
  158. package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -67
  159. package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +0 -106
  160. package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +0 -74
  161. package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +0 -70
  162. package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -40
  163. package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -162
  164. package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -78
  165. package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +0 -87
  166. package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +0 -62
  167. package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -61
  168. package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +0 -62
  169. package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -40
  170. package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +0 -73
  171. package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -40
  172. package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -40
  173. package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +0 -68
  174. package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -53
  175. package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -45
  176. package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -53
  177. package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -115
  178. package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -62
  179. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +0 -152
  180. package/build/libarkts-copy/src/generated/peers/NamedType.ts +0 -84
  181. package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -64
  182. package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -58
  183. package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -78
  184. package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -40
  185. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -94
  186. package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -58
  187. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -58
  188. package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -101
  189. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -65
  190. package/build/libarkts-copy/src/generated/peers/Program.ts +0 -206
  191. package/build/libarkts-copy/src/generated/peers/Property.ts +0 -92
  192. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -65
  193. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -75
  194. package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -40
  195. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +0 -310
  196. package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -40
  197. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -61
  198. package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -40
  199. package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +0 -48
  200. package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -40
  201. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -83
  202. package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -120
  203. package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -44
  204. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -66
  205. package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -40
  206. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -58
  207. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -70
  208. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +0 -71
  209. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -58
  210. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -61
  211. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -84
  212. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -58
  213. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -58
  214. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +0 -70
  215. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -71
  216. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +0 -73
  217. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +0 -112
  218. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -76
  219. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -61
  220. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +0 -75
  221. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +0 -69
  222. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +0 -72
  223. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -73
  224. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -64
  225. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +0 -62
  226. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -61
  227. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +0 -160
  228. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -62
  229. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -62
  230. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -62
  231. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +0 -72
  232. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +0 -79
  233. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -61
  234. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -71
  235. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -68
  236. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -58
  237. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -66
  238. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -58
  239. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -58
  240. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -58
  241. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -74
  242. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -62
  243. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -80
  244. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +0 -71
  245. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +0 -75
  246. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -58
  247. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -58
  248. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -61
  249. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +0 -151
  250. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -71
  251. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -61
  252. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -71
  253. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +0 -121
  254. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +0 -75
  255. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -62
  256. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -68
  257. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -62
  258. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +0 -70
  259. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -58
  260. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -61
  261. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -58
  262. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -58
  263. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +0 -69
  264. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -69
  265. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +0 -68
  266. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -58
  267. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -62
  268. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +0 -89
  269. package/build/libarkts-copy/src/generated/peers/TypeNode.ts +0 -81
  270. package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -44
  271. package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -45
  272. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -61
  273. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -70
  274. package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -58
  275. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -68
  276. package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -40
  277. package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -50
  278. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +0 -113
  279. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -79
  280. package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -40
  281. package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -40
  282. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -71
  283. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -64
@@ -13,95 +13,94 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { throwError } from "../../utils"
17
- import { KNativePointer, nullptr } from "@koalaui/interop"
18
- import { initEs2panda, Es2pandaNativeModule, initGeneratedEs2panda } from "../../Es2pandaNativeModule"
19
- import { Es2pandaNativeModule as GeneratedEs2pandaNativeModule } from "../../generated/Es2pandaNativeModule"
20
- import { initInterop, InteropNativeModule } from "../../InteropNativeModule"
21
- import { Context } from "../peers/Context"
22
- import { Profiler } from "./profiler"
23
- import { ArkTsConfig } from "../../generated"
16
+ import { throwError } from '../../utils';
17
+ import { KNativePointer, nullptr } from '@koalaui/interop';
18
+ import { initEs2panda, Es2pandaNativeModule, initGeneratedEs2panda } from '../../Es2pandaNativeModule';
19
+ import { Es2pandaNativeModule as GeneratedEs2pandaNativeModule } from '../../../generated/Es2pandaNativeModule';
20
+ import { initInterop, InteropNativeModule } from '../../InteropNativeModule';
21
+ import { Context } from '../peers/Context';
22
+ import { Profiler } from './profiler';
23
+ import { ArkTsConfig } from '../../../generated';
24
24
  import { Config } from '../peers/Config';
25
25
 
26
26
  export class UpdateTracker {
27
- stack: boolean[] = []
27
+ stack: boolean[] = [];
28
28
 
29
29
  push() {
30
- this.stack.push(false)
30
+ this.stack.push(false);
31
31
  }
32
32
 
33
33
  update() {
34
- this.stack[this.stack.length - 1] = true
34
+ this.stack[this.stack.length - 1] = true;
35
35
  }
36
36
 
37
37
  check() {
38
- return this.stack.pop()
38
+ return this.stack.pop();
39
39
  }
40
40
  }
41
41
 
42
42
  export class global {
43
- public static filePath: string = "./plugins/input/main.ets"
43
+ public static filePath: string = './plugins/input/main.ets';
44
44
 
45
- public static arktsconfig?: ArkTsConfig
45
+ public static arktsconfig?: ArkTsConfig;
46
46
  public static configObj?: Config;
47
47
 
48
- private static _config?: KNativePointer
48
+ private static _config?: KNativePointer;
49
49
  public static set config(config: KNativePointer) {
50
- global._config = config
50
+ global._config = config;
51
51
  global.configObj = new Config(global._config);
52
52
  }
53
53
  public static get config(): KNativePointer {
54
- return global._config ?? throwError('Global.config not initialized')
54
+ return global._config ?? throwError('Global.config not initialized');
55
55
  }
56
56
  public static configIsInitialized(): boolean {
57
- return global._config !== undefined && global._config !== nullptr
57
+ return global._config !== undefined && global._config !== nullptr;
58
58
  }
59
59
  public static resetConfig(): void {
60
- global._config = undefined
60
+ global._config = undefined;
61
61
  global.configObj = undefined;
62
62
  }
63
63
 
64
64
  // Improve: rename to contextPeer
65
65
  public static get context(): KNativePointer {
66
- return global.compilerContext?.peer ?? throwError('Global.context not initialized')
66
+ return global.compilerContext?.peer ?? throwError('Global.context not initialized');
67
67
  }
68
68
 
69
69
  // Improve: rename to context when the pointer valued one is eliminated
70
- public static compilerContext: Context | undefined
71
- public static isContextGenerateAbcForExternalSourceFiles: boolean = false
70
+ public static compilerContext: Context | undefined;
71
+ public static isContextGenerateAbcForExternalSourceFiles: boolean = false;
72
72
 
73
- private static _es2panda: Es2pandaNativeModule | undefined = undefined
73
+ private static _es2panda: Es2pandaNativeModule | undefined = undefined;
74
74
  public static get es2panda(): Es2pandaNativeModule {
75
75
  if (this._es2panda === undefined) {
76
- this._es2panda = initEs2panda()
76
+ this._es2panda = initEs2panda();
77
77
  }
78
- return this._es2panda
78
+ return this._es2panda;
79
79
  }
80
80
 
81
- private static _generatedEs2panda: GeneratedEs2pandaNativeModule | undefined = undefined
81
+ private static _generatedEs2panda: GeneratedEs2pandaNativeModule | undefined = undefined;
82
82
  public static get generatedEs2panda(): GeneratedEs2pandaNativeModule {
83
83
  if (this._generatedEs2panda === undefined) {
84
- this._generatedEs2panda = initGeneratedEs2panda()
84
+ this._generatedEs2panda = initGeneratedEs2panda();
85
85
  }
86
- return this._generatedEs2panda
86
+ return this._generatedEs2panda;
87
87
  }
88
88
 
89
- private static _interop: InteropNativeModule | undefined = undefined
89
+ private static _interop: InteropNativeModule | undefined = undefined;
90
90
  public static get interop(): InteropNativeModule {
91
- if (this._interop === undefined) this._interop = initInterop()
92
- return this._interop
93
-
91
+ if (this._interop === undefined) this._interop = initInterop();
92
+ return this._interop;
94
93
  }
95
94
 
96
- public static profiler = new Profiler()
95
+ public static profiler = new Profiler();
97
96
 
98
97
  // Check node type values during node creation
99
- public static validatePeerTypes = false
98
+ public static validatePeerTypes = false;
100
99
 
101
100
  public static clearContext(): void {
102
- global.compilerContext = undefined
101
+ global.compilerContext = undefined;
103
102
  }
104
103
 
105
104
  // Keep track of update info to optimize performance
106
- public static updateTracker: UpdateTracker = new UpdateTracker()
105
+ public static updateTracker: UpdateTracker = new UpdateTracker();
107
106
  }
@@ -13,10 +13,10 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { KNativePointer } from "@koalaui/interop";
17
- import { Context } from "../peers/Context";
18
- import { global } from "./global";
19
- import { NodeCache } from "../node-cache"
16
+ import { KNativePointer } from '@koalaui/interop';
17
+ import { Context } from '../peers/Context';
18
+ import { global } from './global';
19
+ import { NodeCache } from '../node-cache';
20
20
 
21
21
  export function getOrUpdateGlobalContext(peer: KNativePointer): Context {
22
22
  if (!global.compilerContext || global.context !== peer) {
@@ -24,4 +24,4 @@ export function getOrUpdateGlobalContext(peer: KNativePointer): Context {
24
24
  global.compilerContext = new Context(peer);
25
25
  }
26
26
  return global.compilerContext;
27
- }
27
+ }
@@ -13,19 +13,19 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import * as fs from "fs"
17
- import * as path from "path"
18
- import { Es2pandaContextState } from "../../generated/Es2pandaEnums"
19
- import { global } from "./global"
16
+ import * as fs from 'fs';
17
+ import * as path from 'path';
18
+ import { Es2pandaContextState } from '../../../generated/Es2pandaEnums';
19
+ import { global } from './global';
20
20
 
21
- const PERFORMANCE_DATA_DIR = "./performance-results/"
21
+ const PERFORMANCE_DATA_DIR = './performance-results/';
22
22
 
23
23
  interface PluginData {
24
- transformTime: number
25
- transformTimeDeps: number
26
- visitedNodes: number
27
- createdNodes: number
28
- contextState?: Es2pandaContextState
24
+ transformTime: number;
25
+ transformTimeDeps: number;
26
+ visitedNodes: number;
27
+ createdNodes: number;
28
+ contextState?: Es2pandaContextState;
29
29
  }
30
30
 
31
31
  function emptyPluginData(contextState?: Es2pandaContextState): PluginData {
@@ -34,156 +34,172 @@ function emptyPluginData(contextState?: Es2pandaContextState): PluginData {
34
34
  transformTimeDeps: 0,
35
35
  visitedNodes: 0,
36
36
  createdNodes: 0,
37
- contextState: contextState
38
- }
37
+ contextState: contextState,
38
+ };
39
39
  }
40
40
 
41
41
  interface PerformanceData {
42
- filePath: string
42
+ filePath: string;
43
43
 
44
- visitedNodes: number
45
- createdNodes: number
46
- proceedTime: number
47
- totalTime: number
44
+ visitedNodes: number;
45
+ createdNodes: number;
46
+ proceedTime: number;
47
+ totalTime: number;
48
48
 
49
- pluginsByName: Record<string, PluginData>
49
+ pluginsByName: Record<string, PluginData>;
50
50
  }
51
51
 
52
52
  interface PerformanceDataFile {
53
- data: PerformanceData[]
54
- summary?: PerformanceData
53
+ data: PerformanceData[];
54
+ summary?: PerformanceData;
55
55
  }
56
56
 
57
57
  function parseFile(performanceFile: string): PerformanceDataFile | undefined {
58
- if (!fs.existsSync(performanceFile)) return undefined
58
+ if (!fs.existsSync(performanceFile)) return undefined;
59
59
 
60
- const data = fs.readFileSync(path.resolve(performanceFile)).toString()
61
- if (!data.length) return undefined
62
- return JSON.parse(data) as PerformanceDataFile
60
+ const data = fs.readFileSync(path.resolve(performanceFile)).toString();
61
+ if (!data.length) return undefined;
62
+ return JSON.parse(data) as PerformanceDataFile;
63
63
  }
64
64
 
65
65
  export class Profiler implements PerformanceData {
66
- filePath: string = ""
67
- visitedNodes: number = 0
68
- createdNodes: number = 0
69
- proceedTime: number = 0
70
- totalTime: number = 0
71
- pluginsByName: Record<string, PluginData> = {}
66
+ filePath: string = '';
67
+ visitedNodes: number = 0;
68
+ createdNodes: number = 0;
69
+ proceedTime: number = 0;
70
+ totalTime: number = 0;
71
+ pluginsByName: Record<string, PluginData> = {};
72
72
 
73
- curPlugin: string = ""
74
- curContextState?: Es2pandaContextState
73
+ curPlugin: string = '';
74
+ curContextState?: Es2pandaContextState;
75
75
 
76
76
  private getPluginData(pluginName: string, contextState?: Es2pandaContextState): PluginData {
77
77
  if (!(pluginName in this.pluginsByName)) {
78
- this.pluginsByName[pluginName] = emptyPluginData(contextState)
78
+ this.pluginsByName[pluginName] = emptyPluginData(contextState);
79
79
  }
80
- return this.pluginsByName[pluginName]
80
+ return this.pluginsByName[pluginName];
81
81
  }
82
82
 
83
- disableReport = false
83
+ disableReport = false;
84
84
 
85
85
  nodeCreated() {
86
- this.createdNodes++
87
- if (this.curPlugin) this.getPluginData(this.curPlugin, this.curContextState).createdNodes++
86
+ this.createdNodes++;
87
+ if (this.curPlugin) this.getPluginData(this.curPlugin, this.curContextState).createdNodes++;
88
88
  }
89
89
 
90
90
  nodeVisited() {
91
- this.visitedNodes++
92
- if (this.curPlugin) this.getPluginData(this.curPlugin, this.curContextState).visitedNodes++
91
+ this.visitedNodes++;
92
+ if (this.curPlugin) this.getPluginData(this.curPlugin, this.curContextState).visitedNodes++;
93
93
  }
94
94
 
95
- private transformStartTime = 0
96
- transformStarted() {
97
- this.transformStartTime = Date.now()
95
+ private transformStartTime = 0;
96
+ transformStarted(): void {
97
+ this.transformStartTime = Date.now();
98
98
  }
99
- private transformDepStartTime = 0
100
- transformDepStarted() {
101
- this.transformDepStartTime = Date.now()
99
+ private transformDepStartTime = 0;
100
+ transformDepStarted(): void {
101
+ this.transformDepStartTime = Date.now();
102
102
  }
103
103
 
104
- transformEnded(state: Es2pandaContextState, pluginName: string) {
105
- const transformEndTime = Date.now()
106
- const consumedTime = transformEndTime - this.transformStartTime
107
- this.getPluginData(pluginName, state).transformTime += consumedTime
104
+ transformEnded(state: Es2pandaContextState, pluginName: string): void {
105
+ const transformEndTime = Date.now();
106
+ const consumedTime = transformEndTime - this.transformStartTime;
107
+ this.getPluginData(pluginName, state).transformTime += consumedTime;
108
108
  }
109
109
 
110
- transformDepEnded(state: Es2pandaContextState, pluginName: string) {
111
- const transformEndTime = Date.now()
112
- const consumedTime = transformEndTime - this.transformDepStartTime
113
- this.getPluginData(pluginName, state).transformTimeDeps += consumedTime
110
+ transformDepEnded(state: Es2pandaContextState, pluginName: string): void {
111
+ const transformEndTime = Date.now();
112
+ const consumedTime = transformEndTime - this.transformDepStartTime;
113
+ this.getPluginData(pluginName, state).transformTimeDeps += consumedTime;
114
114
  }
115
115
 
116
116
  proceededToState(consumedTime: number) {
117
- this.proceedTime += consumedTime
117
+ this.proceedTime += consumedTime;
118
118
  }
119
119
 
120
- private compilationStartTime = 0
120
+ private compilationStartTime = 0;
121
121
  compilationStarted(filePath: string) {
122
- this.filePath = filePath
122
+ this.filePath = filePath;
123
123
 
124
- this.visitedNodes = 0
125
- this.createdNodes = 0
126
- this.proceedTime = 0
127
- this.totalTime = 0
128
- this.pluginsByName = {}
124
+ this.visitedNodes = 0;
125
+ this.createdNodes = 0;
126
+ this.proceedTime = 0;
127
+ this.totalTime = 0;
128
+ this.pluginsByName = {};
129
129
 
130
- this.curPlugin = ""
131
- this.compilationStartTime = Date.now()
130
+ this.curPlugin = '';
131
+ this.compilationStartTime = Date.now();
132
132
  }
133
133
 
134
134
  compilationEnded() {
135
- const consumedTime: number = Date.now() - this.compilationStartTime
136
- this.totalTime = consumedTime
135
+ const consumedTime: number = Date.now() - this.compilationStartTime;
136
+ this.totalTime = consumedTime;
137
137
  }
138
138
 
139
139
  report() {
140
140
  Object.entries(this.pluginsByName).forEach((data, key) => {
141
- console.log(data[0], "totalTransformTime =", data[1].transformTime, "ms")
142
- console.log(data[0], "totalDepsTransformTime =", data[1].transformTimeDeps, "ms")
143
- })
141
+ console.log(data[0], 'totalTransformTime =', data[1].transformTime, 'ms');
142
+ console.log(data[0], 'totalDepsTransformTime =', data[1].transformTimeDeps, 'ms');
143
+ });
144
144
  }
145
145
 
146
146
  reportToFile(withSummary: boolean = false) {
147
- if (this.disableReport) return
148
- const outDir = path.resolve(global.arktsconfig!.outDir, PERFORMANCE_DATA_DIR)
149
- fs.mkdirSync(outDir, { recursive: true })
150
- const outFilePath = path.resolve(outDir, path.basename(this.filePath)) + ".json"
151
-
152
- const data: PerformanceDataFile = { data: [this as PerformanceData] }
147
+ if (this.disableReport) return;
148
+ const outDir = path.resolve(global.arktsconfig!.outDir, PERFORMANCE_DATA_DIR);
149
+ fs.mkdirSync(outDir, { recursive: true });
150
+ const outFilePath = path.resolve(outDir, path.basename(this.filePath)) + '.json';
151
+
152
+ const data: PerformanceDataFile = { data: [this as PerformanceData] };
153
153
  if (!fs.existsSync(outFilePath)) {
154
- fs.writeFileSync(outFilePath, JSON.stringify(data))
154
+ fs.writeFileSync(outFilePath, JSON.stringify(data));
155
155
  } else {
156
- const savedData: PerformanceDataFile | undefined = parseFile(outFilePath) ?? data
157
- savedData.data.push(this as PerformanceData)
156
+ const savedData: PerformanceDataFile | undefined = parseFile(outFilePath) ?? data;
157
+ savedData.data.push(this as PerformanceData);
158
158
 
159
159
  if (withSummary) {
160
160
  const summary: PerformanceData = {
161
161
  filePath: this.filePath,
162
- visitedNodes: savedData.data.map(it => it.visitedNodes).reduce((sum, it) => sum + it),
163
- createdNodes: savedData.data.map(it => it.createdNodes).reduce((sum, it) => sum + it),
164
- proceedTime: savedData.data.map(it => it.proceedTime).reduce((sum, it) => sum + it),
165
- totalTime: savedData.data.map(it => it.totalTime).reduce((sum, it) => sum + it),
166
- pluginsByName: {}
167
- }
168
- const pluginNames = new Set(savedData.data.flatMap(it => Object.keys(it.pluginsByName)))
162
+ visitedNodes: savedData.data.map((it) => it.visitedNodes).reduce((sum, it) => sum + it),
163
+ createdNodes: savedData.data.map((it) => it.createdNodes).reduce((sum, it) => sum + it),
164
+ proceedTime: savedData.data.map((it) => it.proceedTime).reduce((sum, it) => sum + it),
165
+ totalTime: savedData.data.map((it) => it.totalTime).reduce((sum, it) => sum + it),
166
+ pluginsByName: {},
167
+ };
168
+ const pluginNames = new Set(savedData.data.flatMap((it) => Object.keys(it.pluginsByName)));
169
169
  for (const pluginName of pluginNames) {
170
- const sumTransformTime = savedData.data.map(it => it.pluginsByName).filter(it => !!it[pluginName]).map(it => it[pluginName].transformTime).reduce((sum, it) => sum+it)
171
- const sumTransformTimeDeps = savedData.data.map(it => it.pluginsByName).filter(it => !!it[pluginName]).map(it => it[pluginName].transformTimeDeps).reduce((sum, it) => sum+it)
172
- const sumCreatedNodes = savedData.data.map(it => it.pluginsByName).filter(it => !!it[pluginName]).map(it => it[pluginName].createdNodes).reduce((sum, it) => sum+it)
173
- const sumVisitedNodes = savedData.data.map(it => it.pluginsByName).filter(it => !!it[pluginName]).map(it => it[pluginName].visitedNodes).reduce((sum, it) => sum+it)
170
+ const sumTransformTime = savedData.data
171
+ .map((it) => it.pluginsByName)
172
+ .filter((it) => !!it[pluginName])
173
+ .map((it) => it[pluginName].transformTime)
174
+ .reduce((sum, it) => sum + it);
175
+ const sumTransformTimeDeps = savedData.data
176
+ .map((it) => it.pluginsByName)
177
+ .filter((it) => !!it[pluginName])
178
+ .map((it) => it[pluginName].transformTimeDeps)
179
+ .reduce((sum, it) => sum + it);
180
+ const sumCreatedNodes = savedData.data
181
+ .map((it) => it.pluginsByName)
182
+ .filter((it) => !!it[pluginName])
183
+ .map((it) => it[pluginName].createdNodes)
184
+ .reduce((sum, it) => sum + it);
185
+ const sumVisitedNodes = savedData.data
186
+ .map((it) => it.pluginsByName)
187
+ .filter((it) => !!it[pluginName])
188
+ .map((it) => it[pluginName].visitedNodes)
189
+ .reduce((sum, it) => sum + it);
174
190
 
175
191
  summary.pluginsByName[pluginName] = {
176
192
  transformTime: sumTransformTime,
177
193
  transformTimeDeps: sumTransformTimeDeps,
178
194
  createdNodes: sumCreatedNodes,
179
195
  visitedNodes: sumVisitedNodes,
180
- }
196
+ };
181
197
  }
182
198
 
183
- savedData.summary = summary
199
+ savedData.summary = summary;
184
200
  }
185
201
 
186
- fs.writeFileSync(outFilePath, JSON.stringify(savedData))
202
+ fs.writeFileSync(outFilePath, JSON.stringify(savedData));
187
203
  }
188
204
  }
189
205
  }
@@ -13,7 +13,7 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
- import { KInt, KNativePointer, KUInt } from "@koalaui/interop"
16
+ import { KNativePointer, KUInt } from '@koalaui/interop';
17
17
  import type {
18
18
  ClassDefinition,
19
19
  ETSFunctionType,
@@ -25,113 +25,130 @@ import type {
25
25
  Program,
26
26
  ScriptFunction,
27
27
  SourcePosition,
28
- } from "../../generated"
29
- import { ExternalSource } from "../peers/ExternalSource"
30
- import { Es2pandaAstNodeType, Es2pandaModuleFlag } from "../../generated/Es2pandaEnums"
31
- import { global } from "../static/global"
32
- import { acceptNativeObjectArrayResult, passNodeArray, unpackNodeArray, unpackNonNullableNode } from "./private"
33
- import type { AstNode } from "../peers/AstNode"
28
+ } from '../../../generated';
29
+ import { ExternalSource } from '../peers/ExternalSource';
30
+ import { Es2pandaAstNodeType, Es2pandaModuleFlag } from '../../../generated/Es2pandaEnums';
31
+ import { global } from '../static/global';
32
+ import { acceptNativeObjectArrayResult, passNodeArray, unpackNodeArray, unpackNonNullableNode } from './private';
33
+ import type { AstNode } from '../peers/AstNode';
34
34
 
35
35
  export function extension_ETSModuleGetNamespaceFlag(this: ETSModule): Es2pandaModuleFlag {
36
- return (this.isETSScript ? Es2pandaModuleFlag.MODULE_FLAG_ETSSCRIPT : 0)
37
- + (this.isNamespace ? Es2pandaModuleFlag.MODULE_FLAG_NAMESPACE : 0)
38
- + (this.isNamespaceChainLastNode ? Es2pandaModuleFlag.MODULE_FLAG_NAMESPACE_CHAIN_LAST_NODE : 0)
36
+ return (
37
+ (this.isETSScript ? Es2pandaModuleFlag.MODULE_FLAG_ETSSCRIPT : 0) +
38
+ (this.isNamespace ? Es2pandaModuleFlag.MODULE_FLAG_NAMESPACE : 0) +
39
+ (this.isNamespaceChainLastNode ? Es2pandaModuleFlag.MODULE_FLAG_NAMESPACE_CHAIN_LAST_NODE : 0)
40
+ );
39
41
  }
40
42
 
41
43
  // this is a workaround for overloads not included in children list
42
44
  export function extension_MethodDefinitionSetChildrenParentPtr(this: MethodDefinition) {
43
- global.es2panda._AstNodeSetChildrenParentPtr(global.context, this.peer)
44
- const overloads = this.overloads
45
+ global.es2panda._AstNodeSetChildrenParentPtr(global.context, this.peer);
46
+ const overloads = this.overloads;
45
47
  for (const overload of overloads) {
46
- overload.setBaseOverloadMethod(this)
47
- overload.parent = this // overloads are not listed as children in native
48
+ overload.setBaseOverloadMethod(this);
49
+ overload.parent = this; // overloads are not listed as children in native
48
50
  }
49
51
  }
50
52
 
51
53
  export function extension_MethodDefinitionOnUpdate(this: MethodDefinition, original: MethodDefinition): void {
52
- this.setChildrenParentPtr()
53
- global.es2panda._AstNodeOnUpdate(global.context, this.peer, original.peer)
54
- const originalBase = original.baseOverloadMethod
54
+ this.setChildrenParentPtr();
55
+ global.es2panda._AstNodeOnUpdate(global.context, this.peer, original.peer);
56
+ const originalBase = original.baseOverloadMethod;
55
57
  if (originalBase) {
56
- this.setBaseOverloadMethod(originalBase)
58
+ this.setBaseOverloadMethod(originalBase);
57
59
  }
58
60
  }
59
61
 
60
62
  // Improve: generate checker related stuff
61
63
  export function extension_ScriptFunctionGetSignaturePointer(this: ScriptFunction): KNativePointer {
62
- return global.es2panda._Checker_ScriptFunctionSignature(global.context, this.peer)
64
+ return global.es2panda._Checker_ScriptFunctionSignature(global.context, this.peer);
63
65
  }
64
66
 
65
- export function extension_ScriptFunctionSetSignaturePointer(this: ScriptFunction, signaturePointer: KNativePointer): void {
66
- global.es2panda._Checker_ScriptFunctionSetSignature(global.context, this.peer, signaturePointer)
67
+ export function extension_ScriptFunctionSetSignaturePointer(
68
+ this: ScriptFunction,
69
+ signaturePointer: KNativePointer
70
+ ): void {
71
+ global.es2panda._Checker_ScriptFunctionSetSignature(global.context, this.peer, signaturePointer);
67
72
  }
68
73
 
69
74
  // Improve: weird API
70
75
  export function extension_ScriptFunctionGetParamsCasted(this: ScriptFunction): readonly ETSParameterExpression[] {
71
- return unpackNodeArray<ETSParameterExpression>(global.generatedEs2panda._ScriptFunctionParams(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION)
76
+ return unpackNodeArray<ETSParameterExpression>(
77
+ global.generatedEs2panda._ScriptFunctionParams(global.context, this.peer),
78
+ Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION
79
+ );
72
80
  }
73
81
 
74
82
  // Improve: perhaps "preferredReturnType" stuff can be removed later if "signature" is always enough
75
83
  export function extension_ScriptFunctionGetPreferredReturnTypePointer(this: ScriptFunction): KNativePointer {
76
- return global.es2panda._Checker_ScriptFunctionGetPreferredReturnType(global.context, this.peer)
84
+ return global.es2panda._Checker_ScriptFunctionGetPreferredReturnType(global.context, this.peer);
77
85
  }
78
86
 
79
- export function extension_ScriptFunctionSetPreferredReturnTypePointer(this: ScriptFunction, typePointer: KNativePointer): void {
80
- global.es2panda._Checker_ScriptFunctionSetPreferredReturnType(global.context, this.peer, typePointer)
87
+ export function extension_ScriptFunctionSetPreferredReturnTypePointer(
88
+ this: ScriptFunction,
89
+ typePointer: KNativePointer
90
+ ): void {
91
+ global.es2panda._Checker_ScriptFunctionSetPreferredReturnType(global.context, this.peer, typePointer);
81
92
  }
82
93
 
83
94
  // Improve: generate checker related stuff
84
95
  export function extension_ExpressionGetPreferredTypePointer(this: Expression): KNativePointer {
85
- return global.es2panda._Checker_ExpressionGetPreferredType(global.context, this.peer)
96
+ return global.es2panda._Checker_ExpressionGetPreferredType(global.context, this.peer);
86
97
  }
87
98
 
88
99
  export function extension_ExpressionSetPreferredTypePointer(this: Expression, typePointer: KNativePointer): void {
89
- global.es2panda._Checker_ExpressionSetPreferredType(global.context, this.peer, typePointer)
100
+ global.es2panda._Checker_ExpressionSetPreferredType(global.context, this.peer, typePointer);
90
101
  }
91
102
 
92
103
  // Improve: weird API
93
104
  export function extension_ProgramGetAstCasted(this: Program): ETSModule {
94
- return unpackNonNullableNode<ETSModule>(global.generatedEs2panda._ProgramAst(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE)
105
+ return unpackNonNullableNode<ETSModule>(
106
+ global.generatedEs2panda._ProgramAst(global.context, this.peer),
107
+ Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE
108
+ );
95
109
  }
96
110
 
97
111
  // Improve: generate methods with string[] args or return type
98
112
  export function extension_ProgramGetExternalSources(this: Program): ExternalSource[] {
99
113
  return acceptNativeObjectArrayResult<ExternalSource>(
100
114
  global.es2panda._ProgramExternalSources(global.context, this.peer),
101
- ExternalSource.instantiate,
102
- )
115
+ ExternalSource.instantiate
116
+ );
103
117
  }
104
118
 
105
119
  // Improve: SourcePositionLine is global in idl
106
120
  export function extension_SourcePositionGetLine(this: SourcePosition): KUInt {
107
- return global.generatedEs2panda._SourcePositionLine(global.context, this.peer)
121
+ return global.generatedEs2panda._SourcePositionLine(global.context, this.peer);
108
122
  }
109
123
 
110
124
  // Improve: SourcePositionCol is not described in idl
111
125
  export function extension_SourcePositionGetCol(this: SourcePosition): KUInt {
112
- return global.es2panda._SourcePositionCol(global.context, this.peer)
126
+ return global.es2panda._SourcePositionCol(global.context, this.peer);
113
127
  }
114
128
 
115
129
  // Improve: SourcePositionIndex is global in idl
116
130
  export function extension_SourcePositionGetIndex(this: SourcePosition): KUInt {
117
- return global.generatedEs2panda._SourcePositionIndex(global.context, this.peer)
131
+ return global.generatedEs2panda._SourcePositionIndex(global.context, this.peer);
118
132
  }
119
133
 
120
134
  export function extension_SourcePositionToString(this: SourcePosition): string {
121
- return `:${this.getLine() + 1}:${this.getCol()}`
135
+ return `:${this.getLine() + 1}:${this.getCol()}`;
122
136
  }
123
137
 
124
138
  // Improve: weird API
125
139
  export function extension_NumberLiteralValue(this: NumberLiteral): number {
126
- return +this.dumpSrc()
140
+ return +this.dumpSrc();
127
141
  }
128
142
 
129
143
  // Improve: weird API
130
144
  export function extension_ClassDefinitionSetBody(this: ClassDefinition, body: readonly AstNode[]): void {
131
- global.es2panda._ClassDefinitionSetBody(global.context, this.peer, passNodeArray(body), body.length)
145
+ global.es2panda._ClassDefinitionSetBody(global.context, this.peer, passNodeArray(body), body.length);
132
146
  }
133
147
 
134
148
  // Improve: weird API
135
149
  export function extension_ETSFunctionTypeGetParamsCasted(this: ETSFunctionType): readonly ETSParameterExpression[] {
136
- return unpackNodeArray<ETSParameterExpression>(global.generatedEs2panda._ETSFunctionTypeParamsConst(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION)
150
+ return unpackNodeArray<ETSParameterExpression>(
151
+ global.generatedEs2panda._ETSFunctionTypeParamsConst(global.context, this.peer),
152
+ Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION
153
+ );
137
154
  }