@idlizer/arktscgen 2.1.9-arktscgen-5 → 2.1.9-arktscgen-8
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.
- package/build/libarkts-copy/generator/options.json5 +151 -0
- package/build/libarkts-copy/native/meson.build +11 -12
- package/build/libarkts-copy/native/meson_options.txt +1 -1
- package/build/libarkts-copy/native/mingw.cross +14 -0
- package/build/libarkts-copy/native/src/bridges.cc +77 -1
- package/build/libarkts-copy/native/src/common.cc +5 -5
- package/build/libarkts-copy/native/src/generated/bridges.cc +312 -33
- package/build/libarkts-copy/package.json +24 -20
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +19 -1
- package/build/libarkts-copy/src/arkts-api/ChainExpressionFilter.ts +2 -1
- package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +18 -12
- package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +15 -26
- package/build/libarkts-copy/src/arkts-api/index.ts +2 -4
- package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +0 -4
- package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +1 -22
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +7 -8
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +1 -22
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +2 -5
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +44 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +1 -4
- package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +3 -7
- package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +10 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +11 -7
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +3 -6
- package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +13 -12
- package/build/libarkts-copy/src/arkts-api/peers/Config.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/peers/Context.ts +35 -4
- package/build/libarkts-copy/src/arkts-api/plugins.ts +12 -3
- package/build/libarkts-copy/src/arkts-api/static/global.ts +2 -2
- package/build/libarkts-copy/src/{wrapper-compat/arkts-api → arkts-api}/static/globalUtils.ts +4 -4
- package/build/libarkts-copy/src/arkts-api/static/profiler.ts +0 -8
- package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +57 -0
- package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +6 -8
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +153 -29
- package/build/libarkts-copy/src/arkts-api/visitor.ts +16 -10
- package/build/libarkts-copy/src/checkSdk.ts +15 -0
- package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +343 -321
- package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +93 -12
- package/build/libarkts-copy/src/generated/factory.ts +38 -25
- package/build/libarkts-copy/src/generated/index.ts +2 -0
- package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +15 -3
- package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/CallExpression.ts +10 -2
- package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +11 -2
- package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +20 -4
- package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +10 -2
- package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +12 -9
- package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +77 -0
- package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSModule.ts +3 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +29 -5
- package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +12 -3
- package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +14 -2
- package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +103 -0
- package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/Program.ts +8 -0
- package/build/libarkts-copy/src/generated/peers/Property.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +26 -9
- package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +12 -3
- package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSImportType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSInferType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +12 -3
- package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSThisType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +29 -4
- package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TryStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +11 -3
- package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +1 -1
- package/build/libarkts-copy/src/index.ts +1 -4
- package/build/libarkts-copy/src/plugin-utils.ts +37 -37
- package/build/libarkts-copy/src/reexport-for-generated.ts +7 -0
- package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +14 -14
- package/build/libarkts-copy/src/ts-api/index.ts +1 -1
- package/build/libarkts-copy/src/ts-api/types.ts +56 -56
- package/build/libarkts-copy/src/ts-api/utilities/private.ts +6 -6
- package/build/libarkts-copy/src/ts-api/utilities/public.ts +3 -3
- package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +4 -4
- package/build/libarkts-copy/src/utils.ts +13 -159
- package/build/libarkts-copy/src/wrapper-compat/README.md +4 -0
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/index.ts +3 -4
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ArrayExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ArrowFunctionExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/AssignmentExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/BlockStatement.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/CallExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassDefinition.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassProperty.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSFunctionType.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSImportDeclaration.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSParameterExpression.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ExpressionStatement.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/FunctionDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/FunctionExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/IfStatement.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/MemberExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/MethodDefinition.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/NumberLiteral.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ObjectExpression.ts +3 -3
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/Property.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ScriptFunction.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/StructDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSInterfaceDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSTypeParameter.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TryStatement.ts +3 -3
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/VariableDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/VariableDeclarator.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Diagnostic.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/DiagnosticKind.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/ImportPathManager.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Program.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SourceRange.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SuggestionInfo.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/to-be-generated/MemberExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/types.ts +10 -11
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/nativePtrDecoder.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/private.ts +4 -4
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/public.ts +6 -6
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/visitor.ts +10 -10
- package/lib/index.js +7194 -7097
- package/package.json +2 -2
- package/templates/Es2pandaNativeModule.ts +1 -1
- package/templates/bridges.cc +5 -0
- package/build/libarkts-copy/src/arkts-api/CheckedBackFilter.ts +0 -131
- package/build/libarkts-copy/src/arkts-api/CompileWithCache.ts +0 -193
- package/build/libarkts-copy/src/arkts-api/InferVoidReturnType.ts +0 -89
- package/build/libarkts-copy/src/arkts-api/SetBaseOverloads.ts +0 -44
- package/build/libarkts-copy/src/arkts-api/node-utilities/AnnotationUsage.ts +0 -29
- package/build/libarkts-copy/src/arkts-api/node-utilities/ArrowFunctionExpression.ts +0 -49
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDeclaration.ts +0 -54
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +0 -68
- package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclaration.ts +0 -54
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/ArktsObject.ts +0 -45
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Config.ts +0 -53
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Context.ts +0 -60
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SourcePosition.ts +0 -38
|
@@ -38,7 +38,7 @@ import { TSTypeParameter } from "./TSTypeParameter"
|
|
|
38
38
|
|
|
39
39
|
export class TSTypeParameterDeclaration extends Expression {
|
|
40
40
|
constructor(pointer: KNativePointer) {
|
|
41
|
-
assertValidPeer(pointer,
|
|
41
|
+
assertValidPeer(pointer, 121)
|
|
42
42
|
super(pointer)
|
|
43
43
|
}
|
|
44
44
|
static createTSTypeParameterDeclaration(params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration {
|
|
@@ -38,7 +38,7 @@ import { TypeNode } from "./TypeNode"
|
|
|
38
38
|
|
|
39
39
|
export class TSTypeParameterInstantiation extends Expression {
|
|
40
40
|
constructor(pointer: KNativePointer) {
|
|
41
|
-
assertValidPeer(pointer,
|
|
41
|
+
assertValidPeer(pointer, 122)
|
|
42
42
|
super(pointer)
|
|
43
43
|
}
|
|
44
44
|
static createTSTypeParameterInstantiation(params: readonly TypeNode[]): TSTypeParameterInstantiation {
|
|
@@ -38,7 +38,7 @@ import { TypeNode } from "./TypeNode"
|
|
|
38
38
|
|
|
39
39
|
export class TSTypePredicate extends TypeNode {
|
|
40
40
|
constructor(pointer: KNativePointer) {
|
|
41
|
-
assertValidPeer(pointer,
|
|
41
|
+
assertValidPeer(pointer, 123)
|
|
42
42
|
super(pointer)
|
|
43
43
|
}
|
|
44
44
|
static createTSTypePredicate(parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate {
|
|
@@ -38,7 +38,7 @@ import { TypeNode } from "./TypeNode"
|
|
|
38
38
|
|
|
39
39
|
export class TSTypeQuery extends TypeNode {
|
|
40
40
|
constructor(pointer: KNativePointer) {
|
|
41
|
-
assertValidPeer(pointer,
|
|
41
|
+
assertValidPeer(pointer, 139)
|
|
42
42
|
super(pointer)
|
|
43
43
|
}
|
|
44
44
|
static createTSTypeQuery(exprName?: Expression): TSTypeQuery {
|
|
@@ -40,7 +40,7 @@ import { TypeNode } from "./TypeNode"
|
|
|
40
40
|
|
|
41
41
|
export class TSTypeReference extends TypeNode {
|
|
42
42
|
constructor(pointer: KNativePointer) {
|
|
43
|
-
assertValidPeer(pointer,
|
|
43
|
+
assertValidPeer(pointer, 130)
|
|
44
44
|
super(pointer)
|
|
45
45
|
}
|
|
46
46
|
static createTSTypeReference(typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference {
|
|
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
|
|
|
37
37
|
|
|
38
38
|
export class TSUndefinedKeyword extends TypeNode {
|
|
39
39
|
constructor(pointer: KNativePointer) {
|
|
40
|
-
assertValidPeer(pointer,
|
|
40
|
+
assertValidPeer(pointer, 97)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
43
43
|
static createTSUndefinedKeyword(): TSUndefinedKeyword {
|
|
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
|
|
|
37
37
|
|
|
38
38
|
export class TSUnionType extends TypeNode {
|
|
39
39
|
constructor(pointer: KNativePointer) {
|
|
40
|
-
assertValidPeer(pointer,
|
|
40
|
+
assertValidPeer(pointer, 105)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
43
43
|
static createTSUnionType(types: readonly TypeNode[]): TSUnionType {
|
|
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
|
|
|
37
37
|
|
|
38
38
|
export class TSUnknownKeyword extends TypeNode {
|
|
39
39
|
constructor(pointer: KNativePointer) {
|
|
40
|
-
assertValidPeer(pointer,
|
|
40
|
+
assertValidPeer(pointer, 98)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
43
43
|
static createTSUnknownKeyword(): TSUnknownKeyword {
|
|
@@ -37,7 +37,7 @@ import { TypeNode } from "./TypeNode"
|
|
|
37
37
|
|
|
38
38
|
export class TSVoidKeyword extends TypeNode {
|
|
39
39
|
constructor(pointer: KNativePointer) {
|
|
40
|
-
assertValidPeer(pointer,
|
|
40
|
+
assertValidPeer(pointer, 96)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
43
43
|
static createTSVoidKeyword(): TSVoidKeyword {
|
|
@@ -39,7 +39,7 @@ import { TemplateLiteral } from "./TemplateLiteral"
|
|
|
39
39
|
|
|
40
40
|
export class TaggedTemplateExpression extends Expression {
|
|
41
41
|
constructor(pointer: KNativePointer) {
|
|
42
|
-
assertValidPeer(pointer,
|
|
42
|
+
assertValidPeer(pointer, 143)
|
|
43
43
|
super(pointer)
|
|
44
44
|
}
|
|
45
45
|
static createTaggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression {
|
|
@@ -37,7 +37,7 @@ import { Expression } from "./Expression"
|
|
|
37
37
|
|
|
38
38
|
export class TemplateElement extends Expression {
|
|
39
39
|
constructor(pointer: KNativePointer) {
|
|
40
|
-
assertValidPeer(pointer,
|
|
40
|
+
assertValidPeer(pointer, 144)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
43
43
|
static create1TemplateElement(raw: string, cooked: string): TemplateElement {
|
|
@@ -38,7 +38,7 @@ import { TemplateElement } from "./TemplateElement"
|
|
|
38
38
|
|
|
39
39
|
export class TemplateLiteral extends Expression {
|
|
40
40
|
constructor(pointer: KNativePointer) {
|
|
41
|
-
assertValidPeer(pointer,
|
|
41
|
+
assertValidPeer(pointer, 145)
|
|
42
42
|
super(pointer)
|
|
43
43
|
}
|
|
44
44
|
static createTemplateLiteral(quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral {
|
|
@@ -37,7 +37,7 @@ import { Expression } from "./Expression"
|
|
|
37
37
|
|
|
38
38
|
export class ThisExpression extends Expression {
|
|
39
39
|
constructor(pointer: KNativePointer) {
|
|
40
|
-
assertValidPeer(pointer,
|
|
40
|
+
assertValidPeer(pointer, 146)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
43
43
|
static createThisExpression(): ThisExpression {
|
|
@@ -38,7 +38,7 @@ import { Statement } from "./Statement"
|
|
|
38
38
|
|
|
39
39
|
export class ThrowStatement extends Statement {
|
|
40
40
|
constructor(pointer: KNativePointer) {
|
|
41
|
-
assertValidPeer(pointer,
|
|
41
|
+
assertValidPeer(pointer, 148)
|
|
42
42
|
super(pointer)
|
|
43
43
|
}
|
|
44
44
|
static createThrowStatement(argument?: Expression): ThrowStatement {
|
|
@@ -40,7 +40,7 @@ import { Statement } from "./Statement"
|
|
|
40
40
|
|
|
41
41
|
export class TryStatement extends Statement {
|
|
42
42
|
constructor(pointer: KNativePointer) {
|
|
43
|
-
assertValidPeer(pointer,
|
|
43
|
+
assertValidPeer(pointer, 149)
|
|
44
44
|
super(pointer)
|
|
45
45
|
}
|
|
46
46
|
static createTryStatement(block: BlockStatement | undefined, catchClauses: readonly CatchClause[], finalizer: BlockStatement | undefined, finalizerInsertionsLabelPair: readonly LabelPair[], finalizerInsertionsStatement: readonly Statement[]): TryStatement {
|
|
@@ -37,7 +37,7 @@ import { Expression } from "./Expression"
|
|
|
37
37
|
|
|
38
38
|
export class TypeofExpression extends Expression {
|
|
39
39
|
constructor(pointer: KNativePointer) {
|
|
40
|
-
assertValidPeer(pointer,
|
|
40
|
+
assertValidPeer(pointer, 147)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
43
43
|
static createTypeofExpression(argument?: Expression): TypeofExpression {
|
|
@@ -38,7 +38,7 @@ import { Expression } from "./Expression"
|
|
|
38
38
|
|
|
39
39
|
export class UnaryExpression extends Expression {
|
|
40
40
|
constructor(pointer: KNativePointer) {
|
|
41
|
-
assertValidPeer(pointer,
|
|
41
|
+
assertValidPeer(pointer, 150)
|
|
42
42
|
super(pointer)
|
|
43
43
|
}
|
|
44
44
|
static createUnaryExpression(argument: Expression | undefined, unaryOperator: Es2pandaTokenType): UnaryExpression {
|
|
@@ -38,7 +38,7 @@ import { Expression } from "./Expression"
|
|
|
38
38
|
|
|
39
39
|
export class UpdateExpression extends Expression {
|
|
40
40
|
constructor(pointer: KNativePointer) {
|
|
41
|
-
assertValidPeer(pointer,
|
|
41
|
+
assertValidPeer(pointer, 151)
|
|
42
42
|
super(pointer)
|
|
43
43
|
}
|
|
44
44
|
static createUpdateExpression(argument: Expression | undefined, updateOperator: Es2pandaTokenType, isPrefix: boolean): UpdateExpression {
|
|
@@ -41,16 +41,24 @@ import { VariableDeclarator } from "./VariableDeclarator"
|
|
|
41
41
|
|
|
42
42
|
export class VariableDeclaration extends Statement {
|
|
43
43
|
constructor(pointer: KNativePointer) {
|
|
44
|
-
assertValidPeer(pointer,
|
|
44
|
+
assertValidPeer(pointer, 152)
|
|
45
45
|
super(pointer)
|
|
46
46
|
}
|
|
47
|
-
static createVariableDeclaration(kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[]): VariableDeclaration {
|
|
47
|
+
static createVariableDeclaration(kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[], annotations?: readonly AnnotationUsage[]): VariableDeclaration {
|
|
48
48
|
const result: VariableDeclaration = new VariableDeclaration(global.generatedEs2panda._CreateVariableDeclaration(global.context, kind, passNodeArray(declarators), declarators.length))
|
|
49
|
+
if (annotations)
|
|
50
|
+
{
|
|
51
|
+
result.setAnnotations(annotations)
|
|
52
|
+
}
|
|
49
53
|
result.setChildrenParentPtr()
|
|
50
54
|
return result
|
|
51
55
|
}
|
|
52
|
-
static updateVariableDeclaration(original: VariableDeclaration | undefined, kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[]): VariableDeclaration {
|
|
56
|
+
static updateVariableDeclaration(original: VariableDeclaration | undefined, kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[], annotations?: readonly AnnotationUsage[]): VariableDeclaration {
|
|
53
57
|
const result: VariableDeclaration = new VariableDeclaration(global.generatedEs2panda._UpdateVariableDeclaration(global.context, passNode(original), kind, passNodeArray(declarators), declarators.length))
|
|
58
|
+
if (annotations)
|
|
59
|
+
{
|
|
60
|
+
result.setAnnotations(annotations)
|
|
61
|
+
}
|
|
54
62
|
result.setChildrenParentPtr()
|
|
55
63
|
return result
|
|
56
64
|
}
|
|
@@ -39,7 +39,7 @@ import { TypedStatement } from "./TypedStatement"
|
|
|
39
39
|
|
|
40
40
|
export class VariableDeclarator extends TypedStatement {
|
|
41
41
|
constructor(pointer: KNativePointer) {
|
|
42
|
-
assertValidPeer(pointer,
|
|
42
|
+
assertValidPeer(pointer, 153)
|
|
43
43
|
super(pointer)
|
|
44
44
|
}
|
|
45
45
|
static create1VariableDeclarator(flag: Es2pandaVariableDeclaratorFlag, ident?: Expression, init?: Expression): VariableDeclarator {
|
|
@@ -39,7 +39,7 @@ import { Statement } from "./Statement"
|
|
|
39
39
|
|
|
40
40
|
export class WhileStatement extends LoopStatement {
|
|
41
41
|
constructor(pointer: KNativePointer) {
|
|
42
|
-
assertValidPeer(pointer,
|
|
42
|
+
assertValidPeer(pointer, 154)
|
|
43
43
|
super(pointer)
|
|
44
44
|
}
|
|
45
45
|
static createWhileStatement(test?: Expression, body?: Statement): WhileStatement {
|
|
@@ -37,7 +37,7 @@ import { Expression } from "./Expression"
|
|
|
37
37
|
|
|
38
38
|
export class YieldExpression extends Expression {
|
|
39
39
|
constructor(pointer: KNativePointer) {
|
|
40
|
-
assertValidPeer(pointer,
|
|
40
|
+
assertValidPeer(pointer, 155)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
43
43
|
static createYieldExpression(argument: Expression | undefined, isDelegate: boolean): YieldExpression {
|
|
@@ -25,12 +25,8 @@ export * from "./arkts-api/factory/nodeFactory"
|
|
|
25
25
|
export * from "./arkts-api/visitor"
|
|
26
26
|
export * from "./arkts-api/AbstractVisitor"
|
|
27
27
|
export * from "./arkts-api/ChainExpressionFilter"
|
|
28
|
-
export * from "./arkts-api/CheckedBackFilter"
|
|
29
|
-
export * from "./arkts-api/CompileWithCache"
|
|
30
|
-
export * from "./arkts-api/SetBaseOverloads"
|
|
31
28
|
export * from "./arkts-api/plugins"
|
|
32
29
|
export * from "./arkts-api/ImportStorage"
|
|
33
|
-
export * from "./arkts-api/InferVoidReturnType"
|
|
34
30
|
export * from "./arkts-api/ProgramProvider"
|
|
35
31
|
export * from "./arkts-api/node-utilities/Program"
|
|
36
32
|
export * from "./arkts-api/node-utilities/ArkTsConfig"
|
|
@@ -38,6 +34,7 @@ export * from "./arkts-api/node-utilities/ArkTsConfig"
|
|
|
38
34
|
export * from "./arkts-api/peers/AstNode"
|
|
39
35
|
export * from "./arkts-api/peers/Config"
|
|
40
36
|
export * from "./arkts-api/peers/Context"
|
|
37
|
+
export { GlobalContext } from "./arkts-api/peers/Context"
|
|
41
38
|
export * from "./arkts-api/peers/ExternalSource"
|
|
42
39
|
export * from "./arkts-api/peers/ImportPathManager"
|
|
43
40
|
export * from "./arkts-api/peers/Options"
|
|
@@ -17,20 +17,18 @@ import {
|
|
|
17
17
|
Es2pandaContextState,
|
|
18
18
|
PluginContext,
|
|
19
19
|
ImportStorage,
|
|
20
|
-
setBaseOverloads,
|
|
21
20
|
arktsGlobal,
|
|
22
21
|
ChainExpressionFilter,
|
|
23
22
|
ProgramTransformer,
|
|
24
23
|
Program,
|
|
25
|
-
inferVoidReturnType,
|
|
26
24
|
ProgramProvider,
|
|
27
|
-
CompilationOptions
|
|
25
|
+
CompilationOptions,
|
|
26
|
+
dumpProgramSrcFormatted
|
|
28
27
|
} from "./arkts-api"
|
|
29
|
-
import { AstNode } from "./reexport-for-generated"
|
|
30
28
|
|
|
31
29
|
export interface RunTransformerHooks {
|
|
32
|
-
onProgramTransformStart?(options: CompilationOptions): void
|
|
33
|
-
onProgramTransformEnd?(options: CompilationOptions): void
|
|
30
|
+
onProgramTransformStart?(options: CompilationOptions, program: Program): void
|
|
31
|
+
onProgramTransformEnd?(options: CompilationOptions, program: Program): void
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
class ASTCache {
|
|
@@ -44,36 +42,50 @@ class ASTCache {
|
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
|
|
45
|
+
export class DumpingHooks implements RunTransformerHooks {
|
|
46
|
+
constructor(private state: Es2pandaContextState, private pluginName: string, private dumpAst: boolean = false) {
|
|
47
|
+
if (process.env.KOALA_DUMP_PLUGIN_AST) {
|
|
48
|
+
this.dumpAst = true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
onProgramTransformStart(options: CompilationOptions, program: Program) {
|
|
52
|
+
if (this.dumpAst) {
|
|
53
|
+
console.log(`BEFORE ${this.pluginName}:`)
|
|
54
|
+
dumpProgramSrcFormatted(program, true)
|
|
55
|
+
}
|
|
56
|
+
if (!options.isMainProgram) arktsGlobal.profiler.transformDepStarted()
|
|
57
|
+
}
|
|
58
|
+
onProgramTransformEnd(options: CompilationOptions, program: Program) {
|
|
59
|
+
if (!options.isMainProgram) arktsGlobal.profiler.transformDepEnded(this.state, this.pluginName)
|
|
60
|
+
if (this.dumpAst) {
|
|
61
|
+
console.log(`AFTER ${this.pluginName}:`)
|
|
62
|
+
dumpProgramSrcFormatted(program, true)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
47
68
|
export function runTransformerOnProgram(program: Program, options: CompilationOptions, transform: ProgramTransformer | undefined, pluginContext: PluginContext, hooks: RunTransformerHooks = {}) {
|
|
48
69
|
// Perform some additional actions before the transformation start
|
|
49
|
-
hooks.onProgramTransformStart?.(options)
|
|
50
|
-
|
|
51
|
-
// AST to be transformed
|
|
52
|
-
const ast = program.ast
|
|
70
|
+
hooks.onProgramTransformStart?.(options, program)
|
|
53
71
|
|
|
54
72
|
// Save currently existing imports in the program
|
|
55
|
-
const importStorage = new ImportStorage(program, options.
|
|
56
|
-
|
|
57
|
-
// Run some common plugins that should be run before plugin usage and depends on the current stage
|
|
58
|
-
stageSpecificPreFilters(ast, options.stage)
|
|
73
|
+
const importStorage = new ImportStorage(program, options.state == Es2pandaContextState.ES2PANDA_STATE_PARSED)
|
|
59
74
|
|
|
60
75
|
// Run the plugin itself
|
|
61
76
|
transform?.(program, options, pluginContext)
|
|
62
77
|
|
|
63
|
-
// Run some common plugins that should be run after plugin usage and depends on the current
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
// For oveloads, set additional pointer to base overload to fix AST
|
|
67
|
-
setBaseOverloads(ast)
|
|
78
|
+
// Run some common plugins that should be run after plugin usage and depends on the current state
|
|
79
|
+
stateSpecificPostFilters(program, options.state)
|
|
68
80
|
|
|
69
81
|
// Update internal import information based on import modification by plugin
|
|
70
82
|
importStorage.update()
|
|
71
83
|
|
|
72
84
|
// Perform some additional actions after the transformation end
|
|
73
|
-
hooks.onProgramTransformEnd?.(options)
|
|
85
|
+
hooks.onProgramTransformEnd?.(options, program)
|
|
74
86
|
}
|
|
75
87
|
|
|
76
|
-
export function runTransformer(prog: Program, state: Es2pandaContextState,
|
|
88
|
+
export function runTransformer(prog: Program, state: Es2pandaContextState, transform: ProgramTransformer | undefined, pluginContext: PluginContext, hooks: RunTransformerHooks = {}) {
|
|
77
89
|
// Program provider used to provide programs to transformer dynamically relative to inserted imports
|
|
78
90
|
const provider = new ProgramProvider(prog)
|
|
79
91
|
|
|
@@ -85,14 +97,12 @@ export function runTransformer(prog: Program, state: Es2pandaContextState, resta
|
|
|
85
97
|
// Options passed to plugin and hooks
|
|
86
98
|
const options: CompilationOptions = {
|
|
87
99
|
isMainProgram,
|
|
88
|
-
|
|
89
|
-
restart,
|
|
100
|
+
state,
|
|
90
101
|
}
|
|
91
102
|
|
|
92
103
|
runTransformerOnProgram(currentProgram, options, transform, pluginContext, hooks)
|
|
93
104
|
|
|
94
|
-
// The first program is always the main program
|
|
95
|
-
if (restart) break
|
|
105
|
+
// The first program is always the main program
|
|
96
106
|
isMainProgram = false
|
|
97
107
|
|
|
98
108
|
// Proceed to the next program
|
|
@@ -100,18 +110,8 @@ export function runTransformer(prog: Program, state: Es2pandaContextState, resta
|
|
|
100
110
|
}
|
|
101
111
|
}
|
|
102
112
|
|
|
103
|
-
function
|
|
104
|
-
arktsGlobal.es2panda._AstNodeUpdateAll(arktsGlobal.context, ast.peer)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function stageSpecificPreFilters(script: AstNode, state: Es2pandaContextState) {
|
|
108
|
-
if (state == Es2pandaContextState.ES2PANDA_STATE_CHECKED) {
|
|
109
|
-
inferVoidReturnType(script)
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function stageSpecificPostFilters(script: AstNode, state: Es2pandaContextState) {
|
|
113
|
+
function stateSpecificPostFilters(program: Program, state: Es2pandaContextState) {
|
|
114
114
|
if (state == Es2pandaContextState.ES2PANDA_STATE_CHECKED) {
|
|
115
|
-
new ChainExpressionFilter().visitor(
|
|
115
|
+
program.setAst(new ChainExpressionFilter().visitor(program.ast))
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -31,3 +31,10 @@ export {
|
|
|
31
31
|
export { nodeByType } from "./arkts-api/class-by-peer"
|
|
32
32
|
export { global } from "./arkts-api/static/global"
|
|
33
33
|
export { Es2pandaMemberExpressionKind } from "./generated/Es2pandaEnums"
|
|
34
|
+
export {
|
|
35
|
+
extension_ETSModuleGetNamespaceFlag,
|
|
36
|
+
extension_MethodDefinitionOnUpdate,
|
|
37
|
+
extension_MethodDefinitionSetChildrenParentPtr,
|
|
38
|
+
extension_ScriptFunctionGetPreferredReturnTypePointer,
|
|
39
|
+
extension_ScriptFunctionSetPreferredReturnTypePointer,
|
|
40
|
+
} from "./arkts-api/utilities/extensions"
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
ImportSpecifier,
|
|
86
86
|
} from "../types"
|
|
87
87
|
|
|
88
|
-
//
|
|
88
|
+
// Improve: add flags and base
|
|
89
89
|
export function createNodeFactory() {
|
|
90
90
|
return {
|
|
91
91
|
createSourceFile,
|
|
@@ -154,7 +154,7 @@ export function createNodeFactory() {
|
|
|
154
154
|
return new SourceFile(node)
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
//
|
|
157
|
+
// Improve: fix (now doesn't create a new node)
|
|
158
158
|
// @api
|
|
159
159
|
// updateSourceFile(
|
|
160
160
|
// node: SourceFile,
|
|
@@ -315,7 +315,7 @@ export function createNodeFactory() {
|
|
|
315
315
|
): VariableDeclaration {
|
|
316
316
|
return new VariableDeclaration(
|
|
317
317
|
arkts.factory.createVariableDeclarator(
|
|
318
|
-
//
|
|
318
|
+
// Improve: maybe incorrect
|
|
319
319
|
Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_UNKNOWN,
|
|
320
320
|
passIdentifier(name, type),
|
|
321
321
|
passNode(initializer)
|
|
@@ -341,7 +341,7 @@ export function createNodeFactory() {
|
|
|
341
341
|
return new VariableDeclaration(
|
|
342
342
|
arkts.factory.updateVariableDeclarator(
|
|
343
343
|
node.node,
|
|
344
|
-
//
|
|
344
|
+
// Improve: maybe incorrect
|
|
345
345
|
Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_UNKNOWN,
|
|
346
346
|
passIdentifier(name, type),
|
|
347
347
|
passNode(initializer)
|
|
@@ -867,7 +867,7 @@ export function createNodeFactory() {
|
|
|
867
867
|
)
|
|
868
868
|
}
|
|
869
869
|
|
|
870
|
-
//
|
|
870
|
+
// Improve: rewrite maybe
|
|
871
871
|
// @api
|
|
872
872
|
// createToken(
|
|
873
873
|
// token: SyntaxKind._
|
|
@@ -1017,7 +1017,7 @@ export function createNodeFactory() {
|
|
|
1017
1017
|
passNodeArray(members),
|
|
1018
1018
|
// passModifiers(modifiers) | es2panda_ModifierFlags.MODIFIER_FLAGS_PUBLIC | es2panda_ModifierFlags.MODIFIER_FLAGS_STATIC,
|
|
1019
1019
|
Es2pandaModifierFlags.MODIFIER_FLAGS_NONE,
|
|
1020
|
-
//
|
|
1020
|
+
// Improve: pass through modifiers
|
|
1021
1021
|
Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_NONE,
|
|
1022
1022
|
passTypeParams(typeParameters),
|
|
1023
1023
|
undefined
|
|
@@ -1052,7 +1052,7 @@ export function createNodeFactory() {
|
|
|
1052
1052
|
passNodeArray(members),
|
|
1053
1053
|
// passModifiers(modifiers) | es2panda_ModifierFlags.MODIFIER_FLAGS_PUBLIC | es2panda_ModifierFlags.MODIFIER_FLAGS_STATIC,
|
|
1054
1054
|
Es2pandaModifierFlags.MODIFIER_FLAGS_NONE,
|
|
1055
|
-
//
|
|
1055
|
+
// Improve: pass through modifiers
|
|
1056
1056
|
Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_NONE,
|
|
1057
1057
|
passTypeParams(typeParameters)
|
|
1058
1058
|
)
|
|
@@ -1109,7 +1109,7 @@ export function createNodeFactory() {
|
|
|
1109
1109
|
)
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
|
-
//
|
|
1112
|
+
// Improve: fix modifiers
|
|
1113
1113
|
// @api
|
|
1114
1114
|
// createMethodDeclaration(
|
|
1115
1115
|
// modifiers: readonly ModifierLike[] | undefined,
|
|
@@ -1186,7 +1186,7 @@ export function createNodeFactory() {
|
|
|
1186
1186
|
Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD,
|
|
1187
1187
|
_name,
|
|
1188
1188
|
arkts.factory.createFunctionExpression(
|
|
1189
|
-
//
|
|
1189
|
+
// Improve: maybe fix
|
|
1190
1190
|
arkts.factory.updateScriptFunction(
|
|
1191
1191
|
node.node.scriptFunction,
|
|
1192
1192
|
passNode(body),
|
|
@@ -1231,7 +1231,7 @@ export function createNodeFactory() {
|
|
|
1231
1231
|
arkts.FunctionSignature.create(
|
|
1232
1232
|
undefined,
|
|
1233
1233
|
passNodeArray(parameters),
|
|
1234
|
-
//
|
|
1234
|
+
// Improve: change to void maybe
|
|
1235
1235
|
undefined
|
|
1236
1236
|
),
|
|
1237
1237
|
passModifiersToScriptFunction(modifiers) | Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR,
|
|
@@ -1269,14 +1269,14 @@ export function createNodeFactory() {
|
|
|
1269
1269
|
Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_CONSTRUCTOR,
|
|
1270
1270
|
_name,
|
|
1271
1271
|
arkts.factory.createFunctionExpression(
|
|
1272
|
-
//
|
|
1272
|
+
// Improve: maybe fix
|
|
1273
1273
|
arkts.factory.updateScriptFunction(
|
|
1274
1274
|
node.node.scriptFunction,
|
|
1275
1275
|
passNode(body),
|
|
1276
1276
|
arkts.FunctionSignature.create(
|
|
1277
1277
|
undefined,
|
|
1278
1278
|
passNodeArray(parameters),
|
|
1279
|
-
//
|
|
1279
|
+
// Improve: change to void maybe
|
|
1280
1280
|
undefined
|
|
1281
1281
|
),
|
|
1282
1282
|
passModifiersToScriptFunction(modifiers) | Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR,
|
|
@@ -1324,7 +1324,7 @@ export function createNodeFactory() {
|
|
|
1324
1324
|
expression: Expression
|
|
1325
1325
|
): ParenthesizedExpression {
|
|
1326
1326
|
return expression
|
|
1327
|
-
//
|
|
1327
|
+
// Improve:
|
|
1328
1328
|
// return new ParenthesizedExpression(
|
|
1329
1329
|
// expression
|
|
1330
1330
|
// )
|
|
@@ -1340,7 +1340,7 @@ export function createNodeFactory() {
|
|
|
1340
1340
|
expression: Expression
|
|
1341
1341
|
): ParenthesizedExpression {
|
|
1342
1342
|
return expression
|
|
1343
|
-
//
|
|
1343
|
+
// Improve:
|
|
1344
1344
|
// return new ParenthesizedExpression(
|
|
1345
1345
|
// expression
|
|
1346
1346
|
// )
|