@idlizer/arktscgen 2.1.2
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 +155 -0
- package/build/libarkts-copy/native/meson.build +62 -0
- package/build/libarkts-copy/native/meson_options.txt +24 -0
- package/build/libarkts-copy/native/src/bridges.cc +265 -0
- package/build/libarkts-copy/native/src/common.cc +231 -0
- package/build/libarkts-copy/native/src/common.h +39 -0
- package/build/libarkts-copy/native/src/generated/bridges.cc +11979 -0
- package/build/libarkts-copy/package.json +51 -0
- package/build/libarkts-copy/src/Es2pandaEnums.ts +183 -0
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +123 -0
- package/build/libarkts-copy/src/InteropNativeModule.ts +50 -0
- package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +31 -0
- package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +147 -0
- package/build/libarkts-copy/src/arkts-api/index.ts +28 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/createCallExpression.ts +40 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/createNumberLiteral.ts +28 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/createScriptFunction.ts +55 -0
- package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +45 -0
- package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +121 -0
- package/build/libarkts-copy/src/arkts-api/peers/Config.ts +52 -0
- package/build/libarkts-copy/src/arkts-api/peers/Context.ts +46 -0
- package/build/libarkts-copy/src/arkts-api/peers/Program.ts +55 -0
- package/build/libarkts-copy/src/arkts-api/static/global.ts +67 -0
- package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +69 -0
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +156 -0
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +135 -0
- package/build/libarkts-copy/src/arkts-api/visitor.ts +297 -0
- package/build/libarkts-copy/src/es2panda.ts +277 -0
- package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +1266 -0
- package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +3745 -0
- package/build/libarkts-copy/src/generated/factory.ts +1299 -0
- package/build/libarkts-copy/src/generated/index.ts +191 -0
- package/build/libarkts-copy/src/generated/node-map.ts +182 -0
- package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +39 -0
- package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +49 -0
- package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +110 -0
- package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +74 -0
- package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +98 -0
- package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +70 -0
- package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +95 -0
- package/build/libarkts-copy/src/generated/peers/AstDumper.ts +42 -0
- package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +95 -0
- package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/CallExpression.ts +97 -0
- package/build/libarkts-copy/src/generated/peers/CatchClause.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +233 -0
- package/build/libarkts-copy/src/generated/peers/ClassElement.ts +80 -0
- package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +70 -0
- package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +74 -0
- package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/Decorator.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +52 -0
- package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ETSDynamicFunctionType.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +84 -0
- package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +68 -0
- package/build/libarkts-copy/src/generated/peers/ETSLaunchExpression.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/ETSModule.ts +71 -0
- package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +69 -0
- package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +51 -0
- package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +126 -0
- package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +51 -0
- package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +51 -0
- package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +73 -0
- package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +68 -0
- package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +55 -0
- package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +56 -0
- package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +73 -0
- package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/Expression.ts +75 -0
- package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +59 -0
- package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/FunctionDecl.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +69 -0
- package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/Identifier.ts +154 -0
- package/build/libarkts-copy/src/generated/peers/IfStatement.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ImportSource.ts +49 -0
- package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/InterfaceDecl.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/Literal.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +48 -0
- package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +95 -0
- package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +105 -0
- package/build/libarkts-copy/src/generated/peers/NamedType.ts +76 -0
- package/build/libarkts-copy/src/generated/peers/NewExpression.ts +56 -0
- package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +47 -0
- package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +90 -0
- package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/Property.ts +82 -0
- package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +201 -0
- package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +79 -0
- package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +82 -0
- package/build/libarkts-copy/src/generated/peers/Statement.ts +39 -0
- package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +56 -0
- package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +76 -0
- package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +81 -0
- package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +66 -0
- package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +67 -0
- package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/TSImportType.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +56 -0
- package/build/libarkts-copy/src/generated/peers/TSInferType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +102 -0
- package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +71 -0
- package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +66 -0
- package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +72 -0
- package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +67 -0
- package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSThisType.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +88 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +84 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +59 -0
- package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TryStatement.ts +75 -0
- package/build/libarkts-copy/src/generated/peers/TypeNode.ts +49 -0
- package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +39 -0
- package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +42 -0
- package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +71 -0
- package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +69 -0
- package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +56 -0
- package/build/libarkts-copy/src/reexport-for-generated.ts +33 -0
- package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +1375 -0
- package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +110 -0
- package/build/libarkts-copy/src/ts-api/index.ts +35 -0
- package/build/libarkts-copy/src/ts-api/static/enums.ts +18 -0
- package/build/libarkts-copy/src/ts-api/types.ts +920 -0
- package/build/libarkts-copy/src/ts-api/utilities/private.ts +289 -0
- package/build/libarkts-copy/src/ts-api/utilities/public.ts +55 -0
- package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +155 -0
- package/build/libarkts-copy/src/utils.ts +89 -0
- package/build/libarkts-copy/tsconfig.json +15 -0
- package/lib/index.js +11858 -0
- package/package.json +54 -0
- package/templates/Es2pandaEnums.ts +16 -0
- package/templates/Es2pandaNativeModule.ts +32 -0
- package/templates/bridges.cc +18 -0
- package/templates/factory.ts +34 -0
- package/templates/index.ts +16 -0
- package/templates/node-map.ts +31 -0
- package/templates/peer.ts +32 -0
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { TypeNode } from "./TypeNode"
|
|
34
|
+
export class TSTypeQuery extends TypeNode {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 136)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createTSTypeQuery(exprName?: Expression): TSTypeQuery {
|
|
40
|
+
return new TSTypeQuery(global.generatedEs2panda._CreateTSTypeQuery(global.context, passNode(exprName)))
|
|
41
|
+
}
|
|
42
|
+
static updateTSTypeQuery(original?: TSTypeQuery, exprName?: Expression): TSTypeQuery {
|
|
43
|
+
return new TSTypeQuery(global.generatedEs2panda._UpdateTSTypeQuery(global.context, passNode(original), passNode(exprName)))
|
|
44
|
+
}
|
|
45
|
+
get exprName(): Expression | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._TSTypeQueryExprNameConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function isTSTypeQuery(node: object | undefined): node is TSTypeQuery {
|
|
50
|
+
return node instanceof TSTypeQuery
|
|
51
|
+
}
|
|
52
|
+
if (!nodeByType.has(136)) {
|
|
53
|
+
nodeByType.set(136, TSTypeQuery)
|
|
54
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { Identifier } from "./Identifier"
|
|
34
|
+
import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation"
|
|
35
|
+
import { TypeNode } from "./TypeNode"
|
|
36
|
+
export class TSTypeReference extends TypeNode {
|
|
37
|
+
constructor(pointer: KNativePointer) {
|
|
38
|
+
assertValidPeer(pointer, 127)
|
|
39
|
+
super(pointer)
|
|
40
|
+
}
|
|
41
|
+
static createTSTypeReference(typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference {
|
|
42
|
+
return new TSTypeReference(global.generatedEs2panda._CreateTSTypeReference(global.context, passNode(typeName), passNode(typeParams)))
|
|
43
|
+
}
|
|
44
|
+
static updateTSTypeReference(original?: TSTypeReference, typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference {
|
|
45
|
+
return new TSTypeReference(global.generatedEs2panda._UpdateTSTypeReference(global.context, passNode(original), passNode(typeName), passNode(typeParams)))
|
|
46
|
+
}
|
|
47
|
+
get typeParams(): TSTypeParameterInstantiation | undefined {
|
|
48
|
+
return unpackNode(global.generatedEs2panda._TSTypeReferenceTypeParamsConst(global.context, this.peer))
|
|
49
|
+
}
|
|
50
|
+
get typeName(): Expression | undefined {
|
|
51
|
+
return unpackNode(global.generatedEs2panda._TSTypeReferenceTypeNameConst(global.context, this.peer))
|
|
52
|
+
}
|
|
53
|
+
get baseName(): Identifier | undefined {
|
|
54
|
+
return unpackNode(global.generatedEs2panda._TSTypeReferenceBaseNameConst(global.context, this.peer))
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export function isTSTypeReference(node: object | undefined): node is TSTypeReference {
|
|
58
|
+
return node instanceof TSTypeReference
|
|
59
|
+
}
|
|
60
|
+
if (!nodeByType.has(127)) {
|
|
61
|
+
nodeByType.set(127, TSTypeReference)
|
|
62
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { TypeNode } from "./TypeNode"
|
|
33
|
+
export class TSUndefinedKeyword extends TypeNode {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 94)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createTSUndefinedKeyword(): TSUndefinedKeyword {
|
|
39
|
+
return new TSUndefinedKeyword(global.generatedEs2panda._CreateTSUndefinedKeyword(global.context))
|
|
40
|
+
}
|
|
41
|
+
static updateTSUndefinedKeyword(original?: TSUndefinedKeyword): TSUndefinedKeyword {
|
|
42
|
+
return new TSUndefinedKeyword(global.generatedEs2panda._UpdateTSUndefinedKeyword(global.context, passNode(original)))
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export function isTSUndefinedKeyword(node: object | undefined): node is TSUndefinedKeyword {
|
|
46
|
+
return node instanceof TSUndefinedKeyword
|
|
47
|
+
}
|
|
48
|
+
if (!nodeByType.has(94)) {
|
|
49
|
+
nodeByType.set(94, TSUndefinedKeyword)
|
|
50
|
+
}
|
|
@@ -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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { TypeNode } from "./TypeNode"
|
|
33
|
+
export class TSUnionType extends TypeNode {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 102)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createTSUnionType(types: readonly TypeNode[]): TSUnionType {
|
|
39
|
+
return new TSUnionType(global.generatedEs2panda._CreateTSUnionType(global.context, passNodeArray(types), types.length))
|
|
40
|
+
}
|
|
41
|
+
static updateTSUnionType(original: TSUnionType | undefined, types: readonly TypeNode[]): TSUnionType {
|
|
42
|
+
return new TSUnionType(global.generatedEs2panda._UpdateTSUnionType(global.context, passNode(original), passNodeArray(types), types.length))
|
|
43
|
+
}
|
|
44
|
+
get types(): readonly TypeNode[] {
|
|
45
|
+
return unpackNodeArray(global.generatedEs2panda._TSUnionTypeTypesConst(global.context, this.peer))
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function isTSUnionType(node: object | undefined): node is TSUnionType {
|
|
49
|
+
return node instanceof TSUnionType
|
|
50
|
+
}
|
|
51
|
+
if (!nodeByType.has(102)) {
|
|
52
|
+
nodeByType.set(102, TSUnionType)
|
|
53
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { TypeNode } from "./TypeNode"
|
|
33
|
+
export class TSUnknownKeyword extends TypeNode {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 95)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createTSUnknownKeyword(): TSUnknownKeyword {
|
|
39
|
+
return new TSUnknownKeyword(global.generatedEs2panda._CreateTSUnknownKeyword(global.context))
|
|
40
|
+
}
|
|
41
|
+
static updateTSUnknownKeyword(original?: TSUnknownKeyword): TSUnknownKeyword {
|
|
42
|
+
return new TSUnknownKeyword(global.generatedEs2panda._UpdateTSUnknownKeyword(global.context, passNode(original)))
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export function isTSUnknownKeyword(node: object | undefined): node is TSUnknownKeyword {
|
|
46
|
+
return node instanceof TSUnknownKeyword
|
|
47
|
+
}
|
|
48
|
+
if (!nodeByType.has(95)) {
|
|
49
|
+
nodeByType.set(95, TSUnknownKeyword)
|
|
50
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { TypeNode } from "./TypeNode"
|
|
33
|
+
export class TSVoidKeyword extends TypeNode {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 93)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createTSVoidKeyword(): TSVoidKeyword {
|
|
39
|
+
return new TSVoidKeyword(global.generatedEs2panda._CreateTSVoidKeyword(global.context))
|
|
40
|
+
}
|
|
41
|
+
static updateTSVoidKeyword(original?: TSVoidKeyword): TSVoidKeyword {
|
|
42
|
+
return new TSVoidKeyword(global.generatedEs2panda._UpdateTSVoidKeyword(global.context, passNode(original)))
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export function isTSVoidKeyword(node: object | undefined): node is TSVoidKeyword {
|
|
46
|
+
return node instanceof TSVoidKeyword
|
|
47
|
+
}
|
|
48
|
+
if (!nodeByType.has(93)) {
|
|
49
|
+
nodeByType.set(93, TSVoidKeyword)
|
|
50
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation"
|
|
34
|
+
import { TemplateLiteral } from "./TemplateLiteral"
|
|
35
|
+
export class TaggedTemplateExpression extends Expression {
|
|
36
|
+
constructor(pointer: KNativePointer) {
|
|
37
|
+
assertValidPeer(pointer, 140)
|
|
38
|
+
super(pointer)
|
|
39
|
+
}
|
|
40
|
+
static createTaggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression {
|
|
41
|
+
return new TaggedTemplateExpression(global.generatedEs2panda._CreateTaggedTemplateExpression(global.context, passNode(tag), passNode(quasi), passNode(typeParams)))
|
|
42
|
+
}
|
|
43
|
+
static updateTaggedTemplateExpression(original?: TaggedTemplateExpression, tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression {
|
|
44
|
+
return new TaggedTemplateExpression(global.generatedEs2panda._UpdateTaggedTemplateExpression(global.context, passNode(original), passNode(tag), passNode(quasi), passNode(typeParams)))
|
|
45
|
+
}
|
|
46
|
+
get tag(): Expression | undefined {
|
|
47
|
+
return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionTagConst(global.context, this.peer))
|
|
48
|
+
}
|
|
49
|
+
get quasi(): TemplateLiteral | undefined {
|
|
50
|
+
return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionQuasiConst(global.context, this.peer))
|
|
51
|
+
}
|
|
52
|
+
get typeParams(): TSTypeParameterInstantiation | undefined {
|
|
53
|
+
return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionTypeParamsConst(global.context, this.peer))
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function isTaggedTemplateExpression(node: object | undefined): node is TaggedTemplateExpression {
|
|
57
|
+
return node instanceof TaggedTemplateExpression
|
|
58
|
+
}
|
|
59
|
+
if (!nodeByType.has(140)) {
|
|
60
|
+
nodeByType.set(140, TaggedTemplateExpression)
|
|
61
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
export class TemplateElement extends Expression {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 141)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static create1TemplateElement(raw: string, cooked: string): TemplateElement {
|
|
39
|
+
return new TemplateElement(global.generatedEs2panda._CreateTemplateElement1(global.context, raw, cooked))
|
|
40
|
+
}
|
|
41
|
+
static updateTemplateElement(original?: TemplateElement): TemplateElement {
|
|
42
|
+
return new TemplateElement(global.generatedEs2panda._UpdateTemplateElement(global.context, passNode(original)))
|
|
43
|
+
}
|
|
44
|
+
static update1TemplateElement(original: TemplateElement | undefined, raw: string, cooked: string): TemplateElement {
|
|
45
|
+
return new TemplateElement(global.generatedEs2panda._UpdateTemplateElement1(global.context, passNode(original), raw, cooked))
|
|
46
|
+
}
|
|
47
|
+
get raw(): string {
|
|
48
|
+
return unpackString(global.generatedEs2panda._TemplateElementRawConst(global.context, this.peer))
|
|
49
|
+
}
|
|
50
|
+
get cooked(): string {
|
|
51
|
+
return unpackString(global.generatedEs2panda._TemplateElementCookedConst(global.context, this.peer))
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export function isTemplateElement(node: object | undefined): node is TemplateElement {
|
|
55
|
+
return node instanceof TemplateElement
|
|
56
|
+
}
|
|
57
|
+
if (!nodeByType.has(141)) {
|
|
58
|
+
nodeByType.set(141, TemplateElement)
|
|
59
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { TemplateElement } from "./TemplateElement"
|
|
34
|
+
export class TemplateLiteral extends Expression {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 142)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createTemplateLiteral(quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral {
|
|
40
|
+
return new TemplateLiteral(global.generatedEs2panda._CreateTemplateLiteral(global.context, passNodeArray(quasis), quasis.length, passNodeArray(expressions), expressions.length, multilineString))
|
|
41
|
+
}
|
|
42
|
+
static updateTemplateLiteral(original: TemplateLiteral | undefined, quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral {
|
|
43
|
+
return new TemplateLiteral(global.generatedEs2panda._UpdateTemplateLiteral(global.context, passNode(original), passNodeArray(quasis), quasis.length, passNodeArray(expressions), expressions.length, multilineString))
|
|
44
|
+
}
|
|
45
|
+
get quasis(): readonly TemplateElement[] {
|
|
46
|
+
return unpackNodeArray(global.generatedEs2panda._TemplateLiteralQuasisConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
get expressions(): readonly Expression[] {
|
|
49
|
+
return unpackNodeArray(global.generatedEs2panda._TemplateLiteralExpressionsConst(global.context, this.peer))
|
|
50
|
+
}
|
|
51
|
+
get multilineString(): string {
|
|
52
|
+
return unpackString(global.generatedEs2panda._TemplateLiteralGetMultilineStringConst(global.context, this.peer))
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export function isTemplateLiteral(node: object | undefined): node is TemplateLiteral {
|
|
56
|
+
return node instanceof TemplateLiteral
|
|
57
|
+
}
|
|
58
|
+
if (!nodeByType.has(142)) {
|
|
59
|
+
nodeByType.set(142, TemplateLiteral)
|
|
60
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
export class ThisExpression extends Expression {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 143)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createThisExpression(): ThisExpression {
|
|
39
|
+
return new ThisExpression(global.generatedEs2panda._CreateThisExpression(global.context))
|
|
40
|
+
}
|
|
41
|
+
static updateThisExpression(original?: ThisExpression): ThisExpression {
|
|
42
|
+
return new ThisExpression(global.generatedEs2panda._UpdateThisExpression(global.context, passNode(original)))
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export function isThisExpression(node: object | undefined): node is ThisExpression {
|
|
46
|
+
return node instanceof ThisExpression
|
|
47
|
+
}
|
|
48
|
+
if (!nodeByType.has(143)) {
|
|
49
|
+
nodeByType.set(143, ThisExpression)
|
|
50
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { Statement } from "./Statement"
|
|
34
|
+
export class ThrowStatement extends Statement {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 145)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createThrowStatement(argument?: Expression): ThrowStatement {
|
|
40
|
+
return new ThrowStatement(global.generatedEs2panda._CreateThrowStatement(global.context, passNode(argument)))
|
|
41
|
+
}
|
|
42
|
+
static updateThrowStatement(original?: ThrowStatement, argument?: Expression): ThrowStatement {
|
|
43
|
+
return new ThrowStatement(global.generatedEs2panda._UpdateThrowStatement(global.context, passNode(original), passNode(argument)))
|
|
44
|
+
}
|
|
45
|
+
get argument(): Expression | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._ThrowStatementArgumentConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function isThrowStatement(node: object | undefined): node is ThrowStatement {
|
|
50
|
+
return node instanceof ThrowStatement
|
|
51
|
+
}
|
|
52
|
+
if (!nodeByType.has(145)) {
|
|
53
|
+
nodeByType.set(145, ThrowStatement)
|
|
54
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { BlockStatement } from "./BlockStatement"
|
|
33
|
+
import { CatchClause } from "./CatchClause"
|
|
34
|
+
import { Statement } from "./Statement"
|
|
35
|
+
export class TryStatement extends Statement {
|
|
36
|
+
constructor(pointer: KNativePointer) {
|
|
37
|
+
assertValidPeer(pointer, 146)
|
|
38
|
+
super(pointer)
|
|
39
|
+
}
|
|
40
|
+
static create1TryStatement(other?: TryStatement): TryStatement {
|
|
41
|
+
return new TryStatement(global.generatedEs2panda._CreateTryStatement1(global.context, passNode(other)))
|
|
42
|
+
}
|
|
43
|
+
static update1TryStatement(original?: TryStatement, other?: TryStatement): TryStatement {
|
|
44
|
+
return new TryStatement(global.generatedEs2panda._UpdateTryStatement1(global.context, passNode(original), passNode(other)))
|
|
45
|
+
}
|
|
46
|
+
get finallyBlock(): BlockStatement | undefined {
|
|
47
|
+
return unpackNode(global.generatedEs2panda._TryStatementFinallyBlockConst(global.context, this.peer))
|
|
48
|
+
}
|
|
49
|
+
get block(): BlockStatement | undefined {
|
|
50
|
+
return unpackNode(global.generatedEs2panda._TryStatementBlockConst(global.context, this.peer))
|
|
51
|
+
}
|
|
52
|
+
get hasFinalizer(): boolean {
|
|
53
|
+
return global.generatedEs2panda._TryStatementHasFinalizerConst(global.context, this.peer)
|
|
54
|
+
}
|
|
55
|
+
get hasDefaultCatchClause(): boolean {
|
|
56
|
+
return global.generatedEs2panda._TryStatementHasDefaultCatchClauseConst(global.context, this.peer)
|
|
57
|
+
}
|
|
58
|
+
get catchClauses(): readonly CatchClause[] {
|
|
59
|
+
return unpackNodeArray(global.generatedEs2panda._TryStatementCatchClausesConst(global.context, this.peer))
|
|
60
|
+
}
|
|
61
|
+
get finallyCanCompleteNormally(): boolean {
|
|
62
|
+
return global.generatedEs2panda._TryStatementFinallyCanCompleteNormallyConst(global.context, this.peer)
|
|
63
|
+
}
|
|
64
|
+
/** @deprecated */
|
|
65
|
+
setFinallyCanCompleteNormally(finallyCanCompleteNormally: boolean): this {
|
|
66
|
+
global.generatedEs2panda._TryStatementSetFinallyCanCompleteNormally(global.context, this.peer, finallyCanCompleteNormally)
|
|
67
|
+
return this
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export function isTryStatement(node: object | undefined): node is TryStatement {
|
|
71
|
+
return node instanceof TryStatement
|
|
72
|
+
}
|
|
73
|
+
if (!nodeByType.has(146)) {
|
|
74
|
+
nodeByType.set(146, TryStatement)
|
|
75
|
+
}
|