@idlizer/arktscgen 2.1.2 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/libarkts-copy/README.md +36 -0
- package/build/libarkts-copy/generator/options.json5 +113 -44
- package/build/libarkts-copy/native/src/bridges.cc +70 -2
- package/build/libarkts-copy/native/src/generated/bridges.cc +700 -200
- package/build/libarkts-copy/package.json +27 -15
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +42 -4
- package/build/libarkts-copy/src/InteropNativeModule.ts +2 -1
- package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +50 -0
- package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +8 -6
- package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +95 -117
- package/build/libarkts-copy/src/arkts-api/index.ts +3 -1
- package/build/libarkts-copy/src/arkts-api/node-cache.ts +35 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +42 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ArrowFunctionExpression.ts +49 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +50 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/{createCallExpression.ts → CallExpression.ts} +27 -4
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +73 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +41 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +65 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +63 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +60 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +31 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +31 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +41 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +75 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/{createNumberLiteral.ts → NumberLiteral.ts} +15 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +34 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +99 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +61 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +60 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +39 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +36 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +44 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclaration.ts +54 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +37 -0
- package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +15 -14
- package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +30 -0
- package/build/libarkts-copy/src/arkts-api/peers/Program.ts +4 -4
- package/build/libarkts-copy/src/arkts-api/peers/SourcePosition.ts +38 -0
- package/build/libarkts-copy/src/arkts-api/static/global.ts +5 -0
- package/build/libarkts-copy/src/arkts-api/static/profiler.ts +25 -0
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +13 -11
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +68 -10
- package/build/libarkts-copy/src/arkts-api/visitor.ts +175 -42
- package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +504 -458
- package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +225 -75
- package/build/libarkts-copy/src/generated/factory.ts +21 -43
- package/build/libarkts-copy/src/generated/index.ts +24 -3
- package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +12 -12
- package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +10 -5
- package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +13 -7
- package/build/libarkts-copy/src/generated/peers/AstDumper.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +14 -7
- package/build/libarkts-copy/src/generated/peers/BindingProps.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +15 -5
- package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +8 -5
- package/build/libarkts-copy/src/generated/peers/CallExpression.ts +8 -8
- package/build/libarkts-copy/src/generated/peers/CatchClause.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +12 -5
- package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +30 -15
- package/build/libarkts-copy/src/generated/peers/ClassElement.ts +7 -8
- package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +21 -5
- package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/CodeGen.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +8 -5
- package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/Declaration.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/Decorator.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ETSDynamicFunctionType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +15 -15
- package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +26 -17
- package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/ETSModule.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +11 -6
- package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +11 -6
- package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +10 -10
- package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +8 -8
- package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/Expression.ts +4 -5
- package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/FunctionDecl.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +8 -8
- package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +6 -7
- package/build/libarkts-copy/src/generated/peers/IRNode.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/Identifier.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/IfStatement.ts +9 -9
- package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +10 -10
- package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/ImportSource.ts +1 -15
- package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +14 -6
- package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/InterfaceDecl.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/LabelPair.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/Literal.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +24 -8
- package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +25 -8
- package/build/libarkts-copy/src/generated/peers/NamedType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/NewExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +19 -4
- package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/OverloadInfo.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/Property.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +8 -5
- package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +16 -11
- package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/SourceRange.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/Statement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSImportType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSInferType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +10 -10
- package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSThisType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +8 -8
- package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/TryStatement.ts +10 -6
- package/build/libarkts-copy/src/generated/peers/TypeNode.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/VReg.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +4 -4
- package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +5 -5
- package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +7 -7
- package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +35 -0
- package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +6 -6
- package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +4 -4
- package/build/libarkts-copy/src/index.ts +17 -0
- package/build/libarkts-copy/src/reexport-for-generated.ts +1 -1
- package/build/libarkts-copy/src/utils.ts +307 -9
- package/build/libarkts-copy/tsconfig.json +4 -4
- package/lib/index.js +1516 -1120
- package/package.json +6 -6
- package/templates/factory.ts +0 -1
- package/templates/peer.ts +0 -1
- package/build/libarkts-copy/src/Es2pandaEnums.ts +0 -183
- package/build/libarkts-copy/src/arkts-api/node-utilities/createScriptFunction.ts +0 -55
- package/build/libarkts-copy/src/es2panda.ts +0 -277
- package/build/libarkts-copy/src/generated/node-map.ts +0 -182
- package/build/libarkts-copy/src/generated/peers/ETSLaunchExpression.ts +0 -57
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
29
28
|
unpackString
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
32
|
import { Expression } from "./Expression"
|
|
33
33
|
import { TypeNode } from "./TypeNode"
|
|
34
34
|
export class ETSClassLiteral extends Expression {
|
|
35
|
-
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
36
|
assertValidPeer(pointer, 70)
|
|
37
37
|
super(pointer)
|
|
38
38
|
}
|
|
@@ -49,6 +49,6 @@ export class ETSClassLiteral extends Expression {
|
|
|
49
49
|
export function isETSClassLiteral(node: object | undefined): node is ETSClassLiteral {
|
|
50
50
|
return node instanceof ETSClassLiteral
|
|
51
51
|
}
|
|
52
|
-
if (!nodeByType.has(
|
|
53
|
-
nodeByType.set(
|
|
52
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL)) {
|
|
53
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL, (peer: KNativePointer) => new ETSClassLiteral(peer))
|
|
54
54
|
}
|
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
@@ -31,7 +30,7 @@ import {
|
|
|
31
30
|
|
|
32
31
|
import { ETSFunctionType } from "./ETSFunctionType"
|
|
33
32
|
export class ETSDynamicFunctionType extends ETSFunctionType {
|
|
34
|
-
|
|
33
|
+
constructor(pointer: KNativePointer) {
|
|
35
34
|
super(pointer)
|
|
36
35
|
}
|
|
37
36
|
}
|
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
29
28
|
unpackString
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
32
|
import { Es2pandaScriptFunctionFlags } from "./../Es2pandaEnums"
|
|
33
33
|
import { Expression } from "./Expression"
|
|
34
34
|
import { FunctionSignature } from "./FunctionSignature"
|
|
@@ -36,49 +36,49 @@ import { TSInterfaceDeclaration } from "./TSInterfaceDeclaration"
|
|
|
36
36
|
import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration"
|
|
37
37
|
import { TypeNode } from "./TypeNode"
|
|
38
38
|
export class ETSFunctionType extends TypeNode {
|
|
39
|
-
|
|
39
|
+
constructor(pointer: KNativePointer) {
|
|
40
40
|
assertValidPeer(pointer, 66)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
43
43
|
static createETSFunctionType(signature: FunctionSignature | undefined, funcFlags: Es2pandaScriptFunctionFlags): ETSFunctionType {
|
|
44
|
-
return new ETSFunctionType(global.generatedEs2panda.
|
|
44
|
+
return new ETSFunctionType(global.generatedEs2panda._CreateETSFunctionType(global.context, passNode(signature), funcFlags))
|
|
45
45
|
}
|
|
46
46
|
static updateETSFunctionType(original: ETSFunctionType | undefined, signature: FunctionSignature | undefined, funcFlags: Es2pandaScriptFunctionFlags): ETSFunctionType {
|
|
47
|
-
return new ETSFunctionType(global.generatedEs2panda.
|
|
47
|
+
return new ETSFunctionType(global.generatedEs2panda._UpdateETSFunctionType(global.context, passNode(original), passNode(signature), funcFlags))
|
|
48
48
|
}
|
|
49
49
|
get typeParams(): TSTypeParameterDeclaration | undefined {
|
|
50
|
-
return unpackNode(global.generatedEs2panda.
|
|
50
|
+
return unpackNode(global.generatedEs2panda._ETSFunctionTypeTypeParams(global.context, this.peer))
|
|
51
51
|
}
|
|
52
52
|
get params(): readonly Expression[] {
|
|
53
|
-
return unpackNodeArray(global.generatedEs2panda.
|
|
53
|
+
return unpackNodeArray(global.generatedEs2panda._ETSFunctionTypeParamsConst(global.context, this.peer))
|
|
54
54
|
}
|
|
55
55
|
get returnType(): TypeNode | undefined {
|
|
56
|
-
return unpackNode(global.generatedEs2panda.
|
|
56
|
+
return unpackNode(global.generatedEs2panda._ETSFunctionTypeReturnType(global.context, this.peer))
|
|
57
57
|
}
|
|
58
58
|
get functionalInterface(): TSInterfaceDeclaration | undefined {
|
|
59
|
-
return unpackNode(global.generatedEs2panda.
|
|
59
|
+
return unpackNode(global.generatedEs2panda._ETSFunctionTypeFunctionalInterface(global.context, this.peer))
|
|
60
60
|
}
|
|
61
61
|
/** @deprecated */
|
|
62
62
|
setFunctionalInterface(functionalInterface?: TSInterfaceDeclaration): this {
|
|
63
|
-
global.generatedEs2panda.
|
|
63
|
+
global.generatedEs2panda._ETSFunctionTypeSetFunctionalInterface(global.context, this.peer, passNode(functionalInterface))
|
|
64
64
|
return this
|
|
65
65
|
}
|
|
66
66
|
get flags(): Es2pandaScriptFunctionFlags {
|
|
67
|
-
return global.generatedEs2panda.
|
|
67
|
+
return global.generatedEs2panda._ETSFunctionTypeFlags(global.context, this.peer)
|
|
68
68
|
}
|
|
69
69
|
get isThrowing(): boolean {
|
|
70
|
-
return global.generatedEs2panda.
|
|
70
|
+
return global.generatedEs2panda._ETSFunctionTypeIsThrowingConst(global.context, this.peer)
|
|
71
71
|
}
|
|
72
72
|
get isRethrowing(): boolean {
|
|
73
|
-
return global.generatedEs2panda.
|
|
73
|
+
return global.generatedEs2panda._ETSFunctionTypeIsRethrowingConst(global.context, this.peer)
|
|
74
74
|
}
|
|
75
75
|
get isExtensionFunction(): boolean {
|
|
76
|
-
return global.generatedEs2panda.
|
|
76
|
+
return global.generatedEs2panda._ETSFunctionTypeIsExtensionFunctionConst(global.context, this.peer)
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
export function isETSFunctionType(node: object | undefined): node is ETSFunctionType {
|
|
80
80
|
return node instanceof ETSFunctionType
|
|
81
81
|
}
|
|
82
|
-
if (!nodeByType.has(
|
|
83
|
-
nodeByType.set(
|
|
82
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE)) {
|
|
83
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE, (peer: KNativePointer) => new ETSFunctionType(peer))
|
|
84
84
|
}
|
|
@@ -22,47 +22,56 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
29
28
|
unpackString
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
|
+
import { Es2pandaId } from "./../Es2pandaEnums"
|
|
33
|
+
import { Es2pandaImportFlags } from "./../Es2pandaEnums"
|
|
32
34
|
import { Es2pandaImportKinds } from "./../Es2pandaEnums"
|
|
33
35
|
import { ImportDeclaration } from "./ImportDeclaration"
|
|
34
|
-
import { ImportSource } from "./ImportSource"
|
|
35
36
|
import { StringLiteral } from "./StringLiteral"
|
|
36
37
|
export class ETSImportDeclaration extends ImportDeclaration {
|
|
37
|
-
|
|
38
|
+
constructor(pointer: KNativePointer) {
|
|
38
39
|
assertValidPeer(pointer, 78)
|
|
39
40
|
super(pointer)
|
|
40
41
|
}
|
|
41
|
-
static createETSImportDeclaration(
|
|
42
|
-
return new ETSImportDeclaration(global.generatedEs2panda._CreateETSImportDeclaration(global.context, passNode(
|
|
42
|
+
static createETSImportDeclaration(importPath: StringLiteral | undefined, specifiers: readonly AstNode[], importKinds: Es2pandaImportKinds): ETSImportDeclaration {
|
|
43
|
+
return new ETSImportDeclaration(global.generatedEs2panda._CreateETSImportDeclaration(global.context, passNode(importPath), passNodeArray(specifiers), specifiers.length, importKinds))
|
|
43
44
|
}
|
|
44
|
-
static updateETSImportDeclaration(original: ETSImportDeclaration | undefined,
|
|
45
|
-
return new ETSImportDeclaration(global.generatedEs2panda._UpdateETSImportDeclaration(global.context, passNode(original), passNode(
|
|
45
|
+
static updateETSImportDeclaration(original: ETSImportDeclaration | undefined, importPath: StringLiteral | undefined, specifiers: readonly AstNode[], importKinds: Es2pandaImportKinds): ETSImportDeclaration {
|
|
46
|
+
return new ETSImportDeclaration(global.generatedEs2panda._UpdateETSImportDeclaration(global.context, passNode(original), passNode(importPath), passNodeArray(specifiers), specifiers.length, importKinds))
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
/** @deprecated */
|
|
49
|
+
setImportMetadata(importFlags: Es2pandaImportFlags, lang: Es2pandaId, resolvedSource: string, declPath: string, ohmUrl: string): this {
|
|
50
|
+
global.generatedEs2panda._ETSImportDeclarationSetImportMetadata(global.context, this.peer, importFlags, lang, resolvedSource, declPath, ohmUrl)
|
|
51
|
+
return this
|
|
52
|
+
}
|
|
53
|
+
get declPath(): string {
|
|
54
|
+
return unpackString(global.generatedEs2panda._ETSImportDeclarationDeclPathConst(global.context, this.peer))
|
|
55
|
+
}
|
|
56
|
+
get ohmUrl(): string {
|
|
57
|
+
return unpackString(global.generatedEs2panda._ETSImportDeclarationOhmUrlConst(global.context, this.peer))
|
|
58
|
+
}
|
|
59
|
+
get isValid(): boolean {
|
|
60
|
+
return global.generatedEs2panda._ETSImportDeclarationIsValidConst(global.context, this.peer)
|
|
49
61
|
}
|
|
50
62
|
get isPureDynamic(): boolean {
|
|
51
63
|
return global.generatedEs2panda._ETSImportDeclarationIsPureDynamicConst(global.context, this.peer)
|
|
52
64
|
}
|
|
53
65
|
get assemblerName(): string {
|
|
54
|
-
return unpackString(global.generatedEs2panda.
|
|
55
|
-
}
|
|
56
|
-
get source(): StringLiteral | undefined {
|
|
57
|
-
return unpackNode(global.generatedEs2panda._ETSImportDeclarationSourceConst(global.context, this.peer))
|
|
66
|
+
return unpackString(global.generatedEs2panda._ETSImportDeclarationAssemblerName(global.context, this.peer))
|
|
58
67
|
}
|
|
59
|
-
get resolvedSource():
|
|
60
|
-
return
|
|
68
|
+
get resolvedSource(): string {
|
|
69
|
+
return unpackString(global.generatedEs2panda._ETSImportDeclarationResolvedSourceConst(global.context, this.peer))
|
|
61
70
|
}
|
|
62
71
|
}
|
|
63
72
|
export function isETSImportDeclaration(node: object | undefined): node is ETSImportDeclaration {
|
|
64
73
|
return node instanceof ETSImportDeclaration
|
|
65
74
|
}
|
|
66
|
-
if (!nodeByType.has(
|
|
67
|
-
nodeByType.set(
|
|
75
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION)) {
|
|
76
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION, (peer: KNativePointer) => new ETSImportDeclaration(peer))
|
|
68
77
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
KNativePointer,
|
|
26
|
+
nodeByType,
|
|
27
|
+
ArktsObject,
|
|
28
|
+
unpackString
|
|
29
|
+
} from "../../reexport-for-generated"
|
|
30
|
+
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
|
+
import { TypeNode } from "./TypeNode"
|
|
33
|
+
export class ETSKeyofType extends TypeNode {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 74)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createETSKeyofType(type?: TypeNode): ETSKeyofType {
|
|
39
|
+
return new ETSKeyofType(global.generatedEs2panda._CreateETSKeyofType(global.context, passNode(type)))
|
|
40
|
+
}
|
|
41
|
+
static updateETSKeyofType(original?: ETSKeyofType, type?: TypeNode): ETSKeyofType {
|
|
42
|
+
return new ETSKeyofType(global.generatedEs2panda._UpdateETSKeyofType(global.context, passNode(original), passNode(type)))
|
|
43
|
+
}
|
|
44
|
+
get typeRef(): TypeNode | undefined {
|
|
45
|
+
return unpackNode(global.generatedEs2panda._ETSKeyofTypeGetTypeRefConst(global.context, this.peer))
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function isETSKeyofType(node: object | undefined): node is ETSKeyofType {
|
|
49
|
+
return node instanceof ETSKeyofType
|
|
50
|
+
}
|
|
51
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE)) {
|
|
52
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE, (peer: KNativePointer) => new ETSKeyofType(peer))
|
|
53
|
+
}
|
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
@@ -31,14 +30,15 @@ import {
|
|
|
31
30
|
|
|
32
31
|
import { AnnotationUsage } from "./AnnotationUsage"
|
|
33
32
|
import { BlockStatement } from "./BlockStatement"
|
|
33
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
34
34
|
import { Identifier } from "./Identifier"
|
|
35
35
|
export class ETSModule extends BlockStatement {
|
|
36
|
-
|
|
36
|
+
constructor(pointer: KNativePointer) {
|
|
37
37
|
assertValidPeer(pointer, 81)
|
|
38
38
|
super(pointer)
|
|
39
39
|
}
|
|
40
40
|
get ident(): Identifier | undefined {
|
|
41
|
-
return unpackNode(global.generatedEs2panda.
|
|
41
|
+
return unpackNode(global.generatedEs2panda._ETSModuleIdent(global.context, this.peer))
|
|
42
42
|
}
|
|
43
43
|
get isETSScript(): boolean {
|
|
44
44
|
return global.generatedEs2panda._ETSModuleIsETSScriptConst(global.context, this.peer)
|
|
@@ -55,7 +55,7 @@ export class ETSModule extends BlockStatement {
|
|
|
55
55
|
return this
|
|
56
56
|
}
|
|
57
57
|
get annotations(): readonly AnnotationUsage[] {
|
|
58
|
-
return unpackNodeArray(global.generatedEs2panda.
|
|
58
|
+
return unpackNodeArray(global.generatedEs2panda._ETSModuleAnnotations(global.context, this.peer))
|
|
59
59
|
}
|
|
60
60
|
/** @deprecated */
|
|
61
61
|
setAnnotations(annotations: readonly AnnotationUsage[]): this {
|
|
@@ -66,6 +66,6 @@ export class ETSModule extends BlockStatement {
|
|
|
66
66
|
export function isETSModule(node: object | undefined): node is ETSModule {
|
|
67
67
|
return node instanceof ETSModule
|
|
68
68
|
}
|
|
69
|
-
if (!nodeByType.has(
|
|
70
|
-
nodeByType.set(
|
|
69
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE)) {
|
|
70
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE, (peer: KNativePointer) => new ETSModule(peer))
|
|
71
71
|
}
|
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
29
28
|
unpackString
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
32
|
import { Expression } from "./Expression"
|
|
33
33
|
import { TypeNode } from "./TypeNode"
|
|
34
34
|
export class ETSNewArrayInstanceExpression extends Expression {
|
|
35
|
-
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
36
|
assertValidPeer(pointer, 75)
|
|
37
37
|
super(pointer)
|
|
38
38
|
}
|
|
@@ -43,20 +43,25 @@ export class ETSNewArrayInstanceExpression extends Expression {
|
|
|
43
43
|
return new ETSNewArrayInstanceExpression(global.generatedEs2panda._UpdateETSNewArrayInstanceExpression(global.context, passNode(original), passNode(typeReference), passNode(dimension)))
|
|
44
44
|
}
|
|
45
45
|
get typeReference(): TypeNode | undefined {
|
|
46
|
-
return unpackNode(global.generatedEs2panda.
|
|
46
|
+
return unpackNode(global.generatedEs2panda._ETSNewArrayInstanceExpressionTypeReference(global.context, this.peer))
|
|
47
47
|
}
|
|
48
48
|
get dimension(): Expression | undefined {
|
|
49
|
-
return unpackNode(global.generatedEs2panda.
|
|
49
|
+
return unpackNode(global.generatedEs2panda._ETSNewArrayInstanceExpressionDimension(global.context, this.peer))
|
|
50
50
|
}
|
|
51
51
|
/** @deprecated */
|
|
52
52
|
setDimension(dimension?: Expression): this {
|
|
53
53
|
global.generatedEs2panda._ETSNewArrayInstanceExpressionSetDimension(global.context, this.peer, passNode(dimension))
|
|
54
54
|
return this
|
|
55
55
|
}
|
|
56
|
+
/** @deprecated */
|
|
57
|
+
clearPreferredType(): this {
|
|
58
|
+
global.generatedEs2panda._ETSNewArrayInstanceExpressionClearPreferredType(global.context, this.peer)
|
|
59
|
+
return this
|
|
60
|
+
}
|
|
56
61
|
}
|
|
57
62
|
export function isETSNewArrayInstanceExpression(node: object | undefined): node is ETSNewArrayInstanceExpression {
|
|
58
63
|
return node instanceof ETSNewArrayInstanceExpression
|
|
59
64
|
}
|
|
60
|
-
if (!nodeByType.has(
|
|
61
|
-
nodeByType.set(
|
|
65
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION)) {
|
|
66
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION, (peer: KNativePointer) => new ETSNewArrayInstanceExpression(peer))
|
|
62
67
|
}
|
|
@@ -22,16 +22,16 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
29
28
|
unpackString
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
32
|
import { Expression } from "./Expression"
|
|
33
33
|
export class ETSNewClassInstanceExpression extends Expression {
|
|
34
|
-
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
35
|
assertValidPeer(pointer, 77)
|
|
36
36
|
super(pointer)
|
|
37
37
|
}
|
|
@@ -48,7 +48,7 @@ export class ETSNewClassInstanceExpression extends Expression {
|
|
|
48
48
|
return unpackNode(global.generatedEs2panda._ETSNewClassInstanceExpressionGetTypeRefConst(global.context, this.peer))
|
|
49
49
|
}
|
|
50
50
|
get arguments(): readonly Expression[] {
|
|
51
|
-
return unpackNodeArray(global.generatedEs2panda.
|
|
51
|
+
return unpackNodeArray(global.generatedEs2panda._ETSNewClassInstanceExpressionGetArguments(global.context, this.peer))
|
|
52
52
|
}
|
|
53
53
|
/** @deprecated */
|
|
54
54
|
setArguments(_arguments: readonly Expression[]): this {
|
|
@@ -64,6 +64,6 @@ export class ETSNewClassInstanceExpression extends Expression {
|
|
|
64
64
|
export function isETSNewClassInstanceExpression(node: object | undefined): node is ETSNewClassInstanceExpression {
|
|
65
65
|
return node instanceof ETSNewClassInstanceExpression
|
|
66
66
|
}
|
|
67
|
-
if (!nodeByType.has(
|
|
68
|
-
nodeByType.set(
|
|
67
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION)) {
|
|
68
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION, (peer: KNativePointer) => new ETSNewClassInstanceExpression(peer))
|
|
69
69
|
}
|
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
29
28
|
unpackString
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
32
|
import { Expression } from "./Expression"
|
|
33
33
|
import { TypeNode } from "./TypeNode"
|
|
34
34
|
export class ETSNewMultiDimArrayInstanceExpression extends Expression {
|
|
35
|
-
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
36
|
assertValidPeer(pointer, 76)
|
|
37
37
|
super(pointer)
|
|
38
38
|
}
|
|
@@ -46,15 +46,20 @@ export class ETSNewMultiDimArrayInstanceExpression extends Expression {
|
|
|
46
46
|
return new ETSNewMultiDimArrayInstanceExpression(global.generatedEs2panda._UpdateETSNewMultiDimArrayInstanceExpression1(global.context, passNode(original), passNode(other)))
|
|
47
47
|
}
|
|
48
48
|
get typeReference(): TypeNode | undefined {
|
|
49
|
-
return unpackNode(global.generatedEs2panda.
|
|
49
|
+
return unpackNode(global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionTypeReference(global.context, this.peer))
|
|
50
50
|
}
|
|
51
51
|
get dimensions(): readonly Expression[] {
|
|
52
|
-
return unpackNodeArray(global.generatedEs2panda.
|
|
52
|
+
return unpackNodeArray(global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionDimensions(global.context, this.peer))
|
|
53
|
+
}
|
|
54
|
+
/** @deprecated */
|
|
55
|
+
clearPreferredType(): this {
|
|
56
|
+
global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionClearPreferredType(global.context, this.peer)
|
|
57
|
+
return this
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
export function isETSNewMultiDimArrayInstanceExpression(node: object | undefined): node is ETSNewMultiDimArrayInstanceExpression {
|
|
56
61
|
return node instanceof ETSNewMultiDimArrayInstanceExpression
|
|
57
62
|
}
|
|
58
|
-
if (!nodeByType.has(
|
|
59
|
-
nodeByType.set(
|
|
63
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION)) {
|
|
64
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION, (peer: KNativePointer) => new ETSNewMultiDimArrayInstanceExpression(peer))
|
|
60
65
|
}
|
|
@@ -22,29 +22,29 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
29
28
|
unpackString
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
32
|
import { TypeNode } from "./TypeNode"
|
|
33
33
|
export class ETSNullType extends TypeNode {
|
|
34
|
-
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
35
|
assertValidPeer(pointer, 62)
|
|
36
36
|
super(pointer)
|
|
37
37
|
}
|
|
38
38
|
static createETSNullType(): ETSNullType {
|
|
39
|
-
return new ETSNullType(global.generatedEs2panda.
|
|
39
|
+
return new ETSNullType(global.generatedEs2panda._CreateETSNullType(global.context))
|
|
40
40
|
}
|
|
41
41
|
static updateETSNullType(original?: ETSNullType): ETSNullType {
|
|
42
|
-
return new ETSNullType(global.generatedEs2panda.
|
|
42
|
+
return new ETSNullType(global.generatedEs2panda._UpdateETSNullType(global.context, passNode(original)))
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
export function isETSNullType(node: object | undefined): node is ETSNullType {
|
|
46
46
|
return node instanceof ETSNullType
|
|
47
47
|
}
|
|
48
|
-
if (!nodeByType.has(
|
|
49
|
-
nodeByType.set(
|
|
48
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE)) {
|
|
49
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE, (peer: KNativePointer) => new ETSNullType(peer))
|
|
50
50
|
}
|
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
29
28
|
unpackString
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
32
|
import { Expression } from "./Expression"
|
|
33
33
|
import { Statement } from "./Statement"
|
|
34
34
|
export class ETSPackageDeclaration extends Statement {
|
|
35
|
-
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
36
|
assertValidPeer(pointer, 69)
|
|
37
37
|
super(pointer)
|
|
38
38
|
}
|
|
@@ -46,6 +46,6 @@ export class ETSPackageDeclaration extends Statement {
|
|
|
46
46
|
export function isETSPackageDeclaration(node: object | undefined): node is ETSPackageDeclaration {
|
|
47
47
|
return node instanceof ETSPackageDeclaration
|
|
48
48
|
}
|
|
49
|
-
if (!nodeByType.has(
|
|
50
|
-
nodeByType.set(
|
|
49
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION)) {
|
|
50
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION, (peer: KNativePointer) => new ETSPackageDeclaration(peer))
|
|
51
51
|
}
|
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
@@ -31,12 +30,13 @@ import {
|
|
|
31
30
|
|
|
32
31
|
import { AnnotatedExpression } from "./AnnotatedExpression"
|
|
33
32
|
import { AnnotationUsage } from "./AnnotationUsage"
|
|
33
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
34
34
|
import { Expression } from "./Expression"
|
|
35
35
|
import { Identifier } from "./Identifier"
|
|
36
36
|
import { SpreadElement } from "./SpreadElement"
|
|
37
37
|
import { TypeNode } from "./TypeNode"
|
|
38
38
|
export class ETSParameterExpression extends Expression {
|
|
39
|
-
|
|
39
|
+
constructor(pointer: KNativePointer) {
|
|
40
40
|
assertValidPeer(pointer, 79)
|
|
41
41
|
super(pointer)
|
|
42
42
|
}
|
|
@@ -55,8 +55,8 @@ export class ETSParameterExpression extends Expression {
|
|
|
55
55
|
get name(): string {
|
|
56
56
|
return unpackString(global.generatedEs2panda._ETSParameterExpressionNameConst(global.context, this.peer))
|
|
57
57
|
}
|
|
58
|
-
get ident(): Identifier {
|
|
59
|
-
return
|
|
58
|
+
get ident(): Identifier | undefined {
|
|
59
|
+
return unpackNode(global.generatedEs2panda._ETSParameterExpressionIdent(global.context, this.peer))
|
|
60
60
|
}
|
|
61
61
|
/** @deprecated */
|
|
62
62
|
setIdent(ident?: Identifier): this {
|
|
@@ -64,10 +64,10 @@ export class ETSParameterExpression extends Expression {
|
|
|
64
64
|
return this
|
|
65
65
|
}
|
|
66
66
|
get restParameter(): SpreadElement | undefined {
|
|
67
|
-
return unpackNode(global.generatedEs2panda.
|
|
67
|
+
return unpackNode(global.generatedEs2panda._ETSParameterExpressionRestParameter(global.context, this.peer))
|
|
68
68
|
}
|
|
69
69
|
get initializer(): Expression | undefined {
|
|
70
|
-
return unpackNode(global.generatedEs2panda.
|
|
70
|
+
return unpackNode(global.generatedEs2panda._ETSParameterExpressionInitializer(global.context, this.peer))
|
|
71
71
|
}
|
|
72
72
|
/** @deprecated */
|
|
73
73
|
setLexerSaved(s: string): this {
|
|
@@ -78,7 +78,7 @@ export class ETSParameterExpression extends Expression {
|
|
|
78
78
|
return unpackString(global.generatedEs2panda._ETSParameterExpressionLexerSavedConst(global.context, this.peer))
|
|
79
79
|
}
|
|
80
80
|
get typeAnnotation(): TypeNode | undefined {
|
|
81
|
-
return unpackNode(global.generatedEs2panda.
|
|
81
|
+
return unpackNode(global.generatedEs2panda._ETSParameterExpressionTypeAnnotation(global.context, this.peer))
|
|
82
82
|
}
|
|
83
83
|
/** @deprecated */
|
|
84
84
|
setTypeAnnotation(typeNode?: TypeNode): this {
|
|
@@ -110,7 +110,7 @@ export class ETSParameterExpression extends Expression {
|
|
|
110
110
|
return this
|
|
111
111
|
}
|
|
112
112
|
get annotations(): readonly AnnotationUsage[] {
|
|
113
|
-
return unpackNodeArray(global.generatedEs2panda.
|
|
113
|
+
return unpackNodeArray(global.generatedEs2panda._ETSParameterExpressionAnnotations(global.context, this.peer))
|
|
114
114
|
}
|
|
115
115
|
/** @deprecated */
|
|
116
116
|
setAnnotations(annotations: readonly AnnotationUsage[]): this {
|
|
@@ -121,6 +121,6 @@ export class ETSParameterExpression extends Expression {
|
|
|
121
121
|
export function isETSParameterExpression(node: object | undefined): node is ETSParameterExpression {
|
|
122
122
|
return node instanceof ETSParameterExpression
|
|
123
123
|
}
|
|
124
|
-
if (!nodeByType.has(
|
|
125
|
-
nodeByType.set(
|
|
124
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION)) {
|
|
125
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION, (peer: KNativePointer) => new ETSParameterExpression(peer))
|
|
126
126
|
}
|
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
29
28
|
unpackString
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
31
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
32
32
|
import { Es2pandaPrimitiveType } from "./../Es2pandaEnums"
|
|
33
33
|
import { TypeNode } from "./TypeNode"
|
|
34
34
|
export class ETSPrimitiveType extends TypeNode {
|
|
35
|
-
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
36
|
assertValidPeer(pointer, 68)
|
|
37
37
|
super(pointer)
|
|
38
38
|
}
|
|
@@ -49,6 +49,6 @@ export class ETSPrimitiveType extends TypeNode {
|
|
|
49
49
|
export function isETSPrimitiveType(node: object | undefined): node is ETSPrimitiveType {
|
|
50
50
|
return node instanceof ETSPrimitiveType
|
|
51
51
|
}
|
|
52
|
-
if (!nodeByType.has(
|
|
53
|
-
nodeByType.set(
|
|
52
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE)) {
|
|
53
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE, (peer: KNativePointer) => new ETSPrimitiveType(peer))
|
|
54
54
|
}
|
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
unpackNodeArray,
|
|
23
23
|
assertValidPeer,
|
|
24
24
|
AstNode,
|
|
25
|
-
Es2pandaAstNodeType,
|
|
26
25
|
KNativePointer,
|
|
27
26
|
nodeByType,
|
|
28
27
|
ArktsObject,
|
|
@@ -30,14 +29,15 @@ import {
|
|
|
30
29
|
} from "../../reexport-for-generated"
|
|
31
30
|
|
|
32
31
|
import { ETSImportDeclaration } from "./ETSImportDeclaration"
|
|
32
|
+
import { Es2pandaAstNodeType } from "./../Es2pandaEnums"
|
|
33
33
|
import { Statement } from "./Statement"
|
|
34
34
|
export class ETSReExportDeclaration extends Statement {
|
|
35
|
-
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
36
|
assertValidPeer(pointer, 57)
|
|
37
37
|
super(pointer)
|
|
38
38
|
}
|
|
39
39
|
get eTSImportDeclarations(): ETSImportDeclaration | undefined {
|
|
40
|
-
return unpackNode(global.generatedEs2panda.
|
|
40
|
+
return unpackNode(global.generatedEs2panda._ETSReExportDeclarationGetETSImportDeclarations(global.context, this.peer))
|
|
41
41
|
}
|
|
42
42
|
get programPath(): string {
|
|
43
43
|
return unpackString(global.generatedEs2panda._ETSReExportDeclarationGetProgramPathConst(global.context, this.peer))
|
|
@@ -46,6 +46,6 @@ export class ETSReExportDeclaration extends Statement {
|
|
|
46
46
|
export function isETSReExportDeclaration(node: object | undefined): node is ETSReExportDeclaration {
|
|
47
47
|
return node instanceof ETSReExportDeclaration
|
|
48
48
|
}
|
|
49
|
-
if (!nodeByType.has(
|
|
50
|
-
nodeByType.set(
|
|
49
|
+
if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT)) {
|
|
50
|
+
nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT, (peer: KNativePointer) => new ETSReExportDeclaration(peer))
|
|
51
51
|
}
|