@idlizer/arktscgen 2.1.10-arktscgen-2 → 2.1.10-arktscgen-3a
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 +89 -6
- package/build/libarkts-copy/native/meson.build +1 -0
- package/build/libarkts-copy/native/src/bridges.cc +10 -4
- package/build/libarkts-copy/native/src/common.cc +0 -12
- package/build/libarkts-copy/native/src/generated/bridges.cc +416 -723
- package/build/libarkts-copy/native/src/memoryTracker.cc +178 -0
- package/build/libarkts-copy/native/src/memoryTracker.h +52 -0
- package/build/libarkts-copy/package.json +8 -8
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +14 -2
- package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +2 -2
- package/build/libarkts-copy/src/arkts-api/index.ts +2 -1
- package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +4 -1
- package/{templates/node-map.ts → build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts} +8 -19
- package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +26 -9
- package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +309 -0
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +7 -21
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +61 -7
- package/build/libarkts-copy/src/arkts-api/visitor.ts +21 -14
- package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +1 -0
- package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +88 -172
- package/build/libarkts-copy/src/generated/factory.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +11 -13
- package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +3 -1
- package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -5
- package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +12 -14
- package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/CallExpression.ts +6 -2
- package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +1 -24
- package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +26 -20
- package/build/libarkts-copy/src/generated/peers/ClassElement.ts +2 -30
- package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +10 -12
- package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +9 -3
- package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSModule.ts +12 -14
- package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +13 -15
- package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +3 -4
- package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +10 -16
- package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +2 -2
- package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -10
- package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +5 -6
- package/build/libarkts-copy/src/generated/peers/NamedType.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -5
- package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Program.ts +9 -2
- package/build/libarkts-copy/src/generated/peers/Property.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +22 -19
- package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +2 -1
- package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -5
- package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +2 -25
- package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSImportType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSInferType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +14 -38
- package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +26 -40
- package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +11 -13
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TryStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TypeNode.ts +10 -12
- package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +11 -20
- package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -1
- package/build/libarkts-copy/src/index.ts +2 -1
- package/build/libarkts-copy/src/plugin-utils.ts +0 -10
- package/build/libarkts-copy/src/reexport-for-generated.ts +1 -20
- package/lib/index.js +115 -38
- package/package.json +4 -3
- package/templates/factory.ts +0 -1
- package/templates/peer.ts +0 -1
- package/build/libarkts-copy/src/arkts-api/ChainExpressionFilter.ts +0 -79
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
unpackNonNullableNode,
|
|
25
25
|
unpackNode,
|
|
26
26
|
unpackNodeArray,
|
|
27
|
-
assertValidPeer,
|
|
28
27
|
AstNode,
|
|
29
28
|
KNativePointer,
|
|
30
29
|
nodeByType,
|
|
@@ -53,13 +52,13 @@ export class TSTypeReference extends TypeNode {
|
|
|
53
52
|
return result
|
|
54
53
|
}
|
|
55
54
|
get typeParams(): TSTypeParameterInstantiation | undefined {
|
|
56
|
-
return unpackNode(global.generatedEs2panda._TSTypeReferenceTypeParamsConst(global.context, this.peer))
|
|
55
|
+
return unpackNode(global.generatedEs2panda._TSTypeReferenceTypeParamsConst(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION)
|
|
57
56
|
}
|
|
58
57
|
get typeName(): Expression | undefined {
|
|
59
58
|
return unpackNode(global.generatedEs2panda._TSTypeReferenceTypeNameConst(global.context, this.peer))
|
|
60
59
|
}
|
|
61
60
|
get baseName(): Identifier | undefined {
|
|
62
|
-
return unpackNode(global.generatedEs2panda._TSTypeReferenceBaseNameConst(global.context, this.peer))
|
|
61
|
+
return unpackNode(global.generatedEs2panda._TSTypeReferenceBaseNameConst(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER)
|
|
63
62
|
}
|
|
64
63
|
protected readonly brandTSTypeReference: undefined
|
|
65
64
|
}
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
unpackNonNullableNode,
|
|
25
25
|
unpackNode,
|
|
26
26
|
unpackNodeArray,
|
|
27
|
-
assertValidPeer,
|
|
28
27
|
AstNode,
|
|
29
28
|
KNativePointer,
|
|
30
29
|
nodeByType,
|
|
@@ -55,10 +54,10 @@ export class TaggedTemplateExpression extends Expression {
|
|
|
55
54
|
return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionTagConst(global.context, this.peer))
|
|
56
55
|
}
|
|
57
56
|
get quasi(): TemplateLiteral | undefined {
|
|
58
|
-
return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionQuasiConst(global.context, this.peer))
|
|
57
|
+
return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionQuasiConst(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL)
|
|
59
58
|
}
|
|
60
59
|
get typeParams(): TSTypeParameterInstantiation | undefined {
|
|
61
|
-
return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionTypeParamsConst(global.context, this.peer))
|
|
60
|
+
return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionTypeParamsConst(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION)
|
|
62
61
|
}
|
|
63
62
|
protected readonly brandTaggedTemplateExpression: undefined
|
|
64
63
|
}
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
unpackNonNullableNode,
|
|
25
25
|
unpackNode,
|
|
26
26
|
unpackNodeArray,
|
|
27
|
-
assertValidPeer,
|
|
28
27
|
AstNode,
|
|
29
28
|
KNativePointer,
|
|
30
29
|
nodeByType,
|
|
@@ -51,7 +50,7 @@ export class TemplateLiteral extends Expression {
|
|
|
51
50
|
return result
|
|
52
51
|
}
|
|
53
52
|
get quasis(): readonly TemplateElement[] {
|
|
54
|
-
return unpackNodeArray(global.generatedEs2panda._TemplateLiteralQuasisConst(global.context, this.peer))
|
|
53
|
+
return unpackNodeArray(global.generatedEs2panda._TemplateLiteralQuasisConst(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT)
|
|
55
54
|
}
|
|
56
55
|
get expressions(): readonly Expression[] {
|
|
57
56
|
return unpackNodeArray(global.generatedEs2panda._TemplateLiteralExpressionsConst(global.context, this.peer))
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
unpackNonNullableNode,
|
|
25
25
|
unpackNode,
|
|
26
26
|
unpackNodeArray,
|
|
27
|
-
assertValidPeer,
|
|
28
27
|
AstNode,
|
|
29
28
|
KNativePointer,
|
|
30
29
|
nodeByType,
|
|
@@ -70,7 +69,7 @@ export class TryStatement extends Statement {
|
|
|
70
69
|
return global.generatedEs2panda._TryStatementHasDefaultCatchClauseConst(global.context, this.peer)
|
|
71
70
|
}
|
|
72
71
|
get catchClauses(): readonly CatchClause[] {
|
|
73
|
-
return unpackNodeArray(global.generatedEs2panda._TryStatementCatchClausesConst(global.context, this.peer))
|
|
72
|
+
return unpackNodeArray(global.generatedEs2panda._TryStatementCatchClausesConst(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE)
|
|
74
73
|
}
|
|
75
74
|
get finallyCanCompleteNormally(): boolean {
|
|
76
75
|
return global.generatedEs2panda._TryStatementFinallyCanCompleteNormallyConst(global.context, this.peer)
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
unpackNonNullableNode,
|
|
25
25
|
unpackNode,
|
|
26
26
|
unpackNodeArray,
|
|
27
|
-
assertValidPeer,
|
|
28
27
|
AstNode,
|
|
29
28
|
KNativePointer,
|
|
30
29
|
nodeByType,
|
|
@@ -35,14 +34,18 @@ import {
|
|
|
35
34
|
import { AnnotationUsage } from "./AnnotationUsage"
|
|
36
35
|
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
37
36
|
import { Expression } from "./Expression"
|
|
37
|
+
import { SrcDumper } from "./SrcDumper"
|
|
38
38
|
|
|
39
39
|
export class TypeNode extends Expression {
|
|
40
40
|
constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) {
|
|
41
41
|
super(pointer, astNodeType)
|
|
42
42
|
}
|
|
43
|
+
get hasAnnotations(): boolean {
|
|
44
|
+
return global.generatedEs2panda._TypeNodeHasAnnotationsConst(global.context, this.peer)
|
|
45
|
+
}
|
|
43
46
|
/** @deprecated */
|
|
44
|
-
|
|
45
|
-
global.generatedEs2panda.
|
|
47
|
+
emplaceAnnotation(source?: AnnotationUsage): this {
|
|
48
|
+
global.generatedEs2panda._TypeNodeEmplaceAnnotation(global.context, this.peer, passNode(source))
|
|
46
49
|
return this
|
|
47
50
|
}
|
|
48
51
|
/** @deprecated */
|
|
@@ -51,15 +54,15 @@ export class TypeNode extends Expression {
|
|
|
51
54
|
return this
|
|
52
55
|
}
|
|
53
56
|
/** @deprecated */
|
|
54
|
-
|
|
55
|
-
global.generatedEs2panda.
|
|
57
|
+
dumpAnnotations(dumper?: SrcDumper): this {
|
|
58
|
+
global.generatedEs2panda._TypeNodeDumpAnnotationsConst(global.context, this.peer, passNode(dumper))
|
|
56
59
|
return this
|
|
57
60
|
}
|
|
58
61
|
get annotationsForUpdate(): readonly AnnotationUsage[] {
|
|
59
|
-
return unpackNodeArray(global.generatedEs2panda._TypeNodeAnnotationsForUpdate(global.context, this.peer))
|
|
62
|
+
return unpackNodeArray(global.generatedEs2panda._TypeNodeAnnotationsForUpdate(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE)
|
|
60
63
|
}
|
|
61
64
|
get annotations(): readonly AnnotationUsage[] {
|
|
62
|
-
return unpackNodeArray(global.generatedEs2panda._TypeNodeAnnotations(global.context, this.peer))
|
|
65
|
+
return unpackNodeArray(global.generatedEs2panda._TypeNodeAnnotations(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE)
|
|
63
66
|
}
|
|
64
67
|
/** @deprecated */
|
|
65
68
|
setAnnotations(annotationList: readonly AnnotationUsage[]): this {
|
|
@@ -71,11 +74,6 @@ export class TypeNode extends Expression {
|
|
|
71
74
|
global.generatedEs2panda._TypeNodeSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length)
|
|
72
75
|
return this
|
|
73
76
|
}
|
|
74
|
-
/** @deprecated */
|
|
75
|
-
addAnnotations(annotations?: AnnotationUsage): this {
|
|
76
|
-
global.generatedEs2panda._TypeNodeAddAnnotations(global.context, this.peer, passNode(annotations))
|
|
77
|
-
return this
|
|
78
|
-
}
|
|
79
77
|
protected readonly brandTypeNode: undefined
|
|
80
78
|
}
|
|
81
79
|
export function isTypeNode(node: object | undefined): node is TypeNode {
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
unpackNonNullableNode,
|
|
25
25
|
unpackNode,
|
|
26
26
|
unpackNodeArray,
|
|
27
|
-
assertValidPeer,
|
|
28
27
|
AstNode,
|
|
29
28
|
KNativePointer,
|
|
30
29
|
nodeByType,
|
|
@@ -33,9 +32,9 @@ import {
|
|
|
33
32
|
} from "../../reexport-for-generated"
|
|
34
33
|
|
|
35
34
|
import { AnnotationUsage } from "./AnnotationUsage"
|
|
36
|
-
import { Decorator } from "./Decorator"
|
|
37
35
|
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
38
36
|
import { Es2pandaVariableDeclarationKind } from "./../Es2pandaEnums"
|
|
37
|
+
import { SrcDumper } from "./SrcDumper"
|
|
39
38
|
import { Statement } from "./Statement"
|
|
40
39
|
import { VariableDeclarator } from "./VariableDeclarator"
|
|
41
40
|
|
|
@@ -62,23 +61,20 @@ export class VariableDeclaration extends Statement {
|
|
|
62
61
|
return result
|
|
63
62
|
}
|
|
64
63
|
get declarators(): readonly VariableDeclarator[] {
|
|
65
|
-
return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDeclarators(global.context, this.peer))
|
|
64
|
+
return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDeclarators(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR)
|
|
66
65
|
}
|
|
67
66
|
get declaratorsForUpdate(): readonly VariableDeclarator[] {
|
|
68
|
-
return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDeclaratorsForUpdate(global.context, this.peer))
|
|
67
|
+
return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDeclaratorsForUpdate(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR)
|
|
69
68
|
}
|
|
70
69
|
get kind(): Es2pandaVariableDeclarationKind {
|
|
71
70
|
return global.generatedEs2panda._VariableDeclarationKindConst(global.context, this.peer)
|
|
72
71
|
}
|
|
73
|
-
get
|
|
74
|
-
return
|
|
75
|
-
}
|
|
76
|
-
get decoratorsForUpdate(): readonly Decorator[] {
|
|
77
|
-
return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDecoratorsForUpdate(global.context, this.peer))
|
|
72
|
+
get hasAnnotations(): boolean {
|
|
73
|
+
return global.generatedEs2panda._VariableDeclarationHasAnnotationsConst(global.context, this.peer)
|
|
78
74
|
}
|
|
79
75
|
/** @deprecated */
|
|
80
|
-
|
|
81
|
-
global.generatedEs2panda.
|
|
76
|
+
emplaceAnnotation(source?: AnnotationUsage): this {
|
|
77
|
+
global.generatedEs2panda._VariableDeclarationEmplaceAnnotation(global.context, this.peer, passNode(source))
|
|
82
78
|
return this
|
|
83
79
|
}
|
|
84
80
|
/** @deprecated */
|
|
@@ -87,15 +83,15 @@ export class VariableDeclaration extends Statement {
|
|
|
87
83
|
return this
|
|
88
84
|
}
|
|
89
85
|
/** @deprecated */
|
|
90
|
-
|
|
91
|
-
global.generatedEs2panda.
|
|
86
|
+
dumpAnnotations(dumper?: SrcDumper): this {
|
|
87
|
+
global.generatedEs2panda._VariableDeclarationDumpAnnotationsConst(global.context, this.peer, passNode(dumper))
|
|
92
88
|
return this
|
|
93
89
|
}
|
|
94
90
|
get annotationsForUpdate(): readonly AnnotationUsage[] {
|
|
95
|
-
return unpackNodeArray(global.generatedEs2panda._VariableDeclarationAnnotationsForUpdate(global.context, this.peer))
|
|
91
|
+
return unpackNodeArray(global.generatedEs2panda._VariableDeclarationAnnotationsForUpdate(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE)
|
|
96
92
|
}
|
|
97
93
|
get annotations(): readonly AnnotationUsage[] {
|
|
98
|
-
return unpackNodeArray(global.generatedEs2panda._VariableDeclarationAnnotations(global.context, this.peer))
|
|
94
|
+
return unpackNodeArray(global.generatedEs2panda._VariableDeclarationAnnotations(global.context, this.peer), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE)
|
|
99
95
|
}
|
|
100
96
|
/** @deprecated */
|
|
101
97
|
setAnnotations(annotationList: readonly AnnotationUsage[]): this {
|
|
@@ -107,11 +103,6 @@ export class VariableDeclaration extends Statement {
|
|
|
107
103
|
global.generatedEs2panda._VariableDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length)
|
|
108
104
|
return this
|
|
109
105
|
}
|
|
110
|
-
/** @deprecated */
|
|
111
|
-
addAnnotations(annotations?: AnnotationUsage): this {
|
|
112
|
-
global.generatedEs2panda._VariableDeclarationAddAnnotations(global.context, this.peer, passNode(annotations))
|
|
113
|
-
return this
|
|
114
|
-
}
|
|
115
106
|
protected readonly brandVariableDeclaration: undefined
|
|
116
107
|
}
|
|
117
108
|
export function isVariableDeclaration(node: object | undefined): node is VariableDeclaration {
|
|
@@ -19,12 +19,12 @@ export * from "./reexport-for-generated"
|
|
|
19
19
|
export * from "./generated/Es2pandaEnums"
|
|
20
20
|
export * from "./generated"
|
|
21
21
|
|
|
22
|
+
export * from "./arkts-api/utilities/performance"
|
|
22
23
|
export * from "./arkts-api/utilities/private"
|
|
23
24
|
export * from "./arkts-api/utilities/public"
|
|
24
25
|
export * from "./arkts-api/factory/nodeFactory"
|
|
25
26
|
export * from "./arkts-api/visitor"
|
|
26
27
|
export * from "./arkts-api/AbstractVisitor"
|
|
27
|
-
export * from "./arkts-api/ChainExpressionFilter"
|
|
28
28
|
export * from "./arkts-api/plugins"
|
|
29
29
|
export * from "./arkts-api/ImportStorage"
|
|
30
30
|
export * from "./arkts-api/ProgramProvider"
|
|
@@ -38,6 +38,7 @@ export { GlobalContext } from "./arkts-api/peers/Context"
|
|
|
38
38
|
export * from "./arkts-api/peers/ExternalSource"
|
|
39
39
|
export * from "./arkts-api/peers/ImportPathManager"
|
|
40
40
|
export * from "./arkts-api/peers/Options"
|
|
41
|
+
export * from "./arkts-api/peers/DiagnosticKind"
|
|
41
42
|
export { global as arktsGlobal } from "./arkts-api/static/global"
|
|
42
43
|
export * from "./arkts-api/static/globalUtils"
|
|
43
44
|
export * as arkts from "./arkts-api"
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
PluginContext,
|
|
19
19
|
ImportStorage,
|
|
20
20
|
arktsGlobal,
|
|
21
|
-
ChainExpressionFilter,
|
|
22
21
|
ProgramTransformer,
|
|
23
22
|
Program,
|
|
24
23
|
ProgramProvider,
|
|
@@ -80,9 +79,6 @@ export function runTransformerOnProgram(program: Program, options: CompilationOp
|
|
|
80
79
|
// Run the plugin itself
|
|
81
80
|
transform?.(program, options, pluginContext)
|
|
82
81
|
|
|
83
|
-
// Run some common plugins that should be run after plugin usage and depends on the current state
|
|
84
|
-
stateSpecificPostFilters(program, options.state)
|
|
85
|
-
|
|
86
82
|
// Update internal import information based on import modification by plugin
|
|
87
83
|
importStorage.update()
|
|
88
84
|
|
|
@@ -117,12 +113,6 @@ export function runTransformer(prog: Program, state: Es2pandaContextState, trans
|
|
|
117
113
|
}
|
|
118
114
|
}
|
|
119
115
|
|
|
120
|
-
function stateSpecificPostFilters(program: Program, state: Es2pandaContextState) {
|
|
121
|
-
if (state == Es2pandaContextState.ES2PANDA_STATE_CHECKED) {
|
|
122
|
-
program.setAst(new ChainExpressionFilter().visitor(program.ast))
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
116
|
function isProgramForCodegeneration(
|
|
127
117
|
program: Program,
|
|
128
118
|
isMainProgram: boolean,
|
|
@@ -22,30 +22,11 @@ export {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
passNodeArray,
|
|
24
24
|
unpackNode,
|
|
25
|
-
unpackNonNullableObject,
|
|
26
25
|
unpackString,
|
|
27
|
-
unpackObject,
|
|
28
26
|
assertValidPeer,
|
|
29
27
|
updateNodeByNode
|
|
30
28
|
} from "./arkts-api/utilities/private"
|
|
31
29
|
export { nodeByType } from "./arkts-api/class-by-peer"
|
|
32
30
|
export { global } from "./arkts-api/static/global"
|
|
33
31
|
export { Es2pandaMemberExpressionKind } from "./generated/Es2pandaEnums"
|
|
34
|
-
export
|
|
35
|
-
extension_ETSModuleGetNamespaceFlag,
|
|
36
|
-
extension_MethodDefinitionOnUpdate,
|
|
37
|
-
extension_MethodDefinitionSetChildrenParentPtr,
|
|
38
|
-
extension_ScriptFunctionGetSignaturePointer,
|
|
39
|
-
extension_ScriptFunctionSetSignaturePointer,
|
|
40
|
-
extension_ScriptFunctionGetPreferredReturnTypePointer,
|
|
41
|
-
extension_ScriptFunctionSetPreferredReturnTypePointer,
|
|
42
|
-
extension_ExpressionGetPreferredTypePointer,
|
|
43
|
-
extension_ExpressionSetPreferredTypePointer,
|
|
44
|
-
extension_ProgramGetExternalSources,
|
|
45
|
-
extension_SourcePositionGetCol,
|
|
46
|
-
extension_SourcePositionGetLine,
|
|
47
|
-
extension_SourcePositionToString,
|
|
48
|
-
extension_NumberLiteralValue,
|
|
49
|
-
extension_ScriptFunctionSetParams,
|
|
50
|
-
extension_ClassDefinitionSetBody,
|
|
51
|
-
} from "./arkts-api/utilities/extensions"
|
|
32
|
+
export * from "./arkts-api/utilities/extensions"
|