@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,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 { Es2pandaImportKinds } from "./../Es2pandaEnums"
|
|
33
|
+
import { Statement } from "./Statement"
|
|
34
|
+
import { StringLiteral } from "./StringLiteral"
|
|
35
|
+
export class ImportDeclaration extends Statement {
|
|
36
|
+
constructor(pointer: KNativePointer) {
|
|
37
|
+
assertValidPeer(pointer, 39)
|
|
38
|
+
super(pointer)
|
|
39
|
+
}
|
|
40
|
+
static createImportDeclaration(source: StringLiteral | undefined, specifiers: readonly AstNode[], importKind: Es2pandaImportKinds): ImportDeclaration {
|
|
41
|
+
return new ImportDeclaration(global.generatedEs2panda._CreateImportDeclaration(global.context, passNode(source), passNodeArray(specifiers), specifiers.length, importKind))
|
|
42
|
+
}
|
|
43
|
+
static updateImportDeclaration(original: ImportDeclaration | undefined, source: StringLiteral | undefined, specifiers: readonly AstNode[], importKind: Es2pandaImportKinds): ImportDeclaration {
|
|
44
|
+
return new ImportDeclaration(global.generatedEs2panda._UpdateImportDeclaration(global.context, passNode(original), passNode(source), passNodeArray(specifiers), specifiers.length, importKind))
|
|
45
|
+
}
|
|
46
|
+
get source(): StringLiteral | undefined {
|
|
47
|
+
return unpackNode(global.generatedEs2panda._ImportDeclarationSourceConst(global.context, this.peer))
|
|
48
|
+
}
|
|
49
|
+
get specifiers(): readonly AstNode[] {
|
|
50
|
+
return unpackNodeArray(global.generatedEs2panda._ImportDeclarationSpecifiersConst(global.context, this.peer))
|
|
51
|
+
}
|
|
52
|
+
get isTypeKind(): boolean {
|
|
53
|
+
return global.generatedEs2panda._ImportDeclarationIsTypeKindConst(global.context, this.peer)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function isImportDeclaration(node: object | undefined): node is ImportDeclaration {
|
|
57
|
+
return node instanceof ImportDeclaration
|
|
58
|
+
}
|
|
59
|
+
if (!nodeByType.has(39)) {
|
|
60
|
+
nodeByType.set(39, ImportDeclaration)
|
|
61
|
+
}
|
|
@@ -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 { Identifier } from "./Identifier"
|
|
33
|
+
import { Statement } from "./Statement"
|
|
34
|
+
export class ImportDefaultSpecifier extends Statement {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 41)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createImportDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier {
|
|
40
|
+
return new ImportDefaultSpecifier(global.generatedEs2panda._CreateImportDefaultSpecifier(global.context, passNode(local)))
|
|
41
|
+
}
|
|
42
|
+
static updateImportDefaultSpecifier(original?: ImportDefaultSpecifier, local?: Identifier): ImportDefaultSpecifier {
|
|
43
|
+
return new ImportDefaultSpecifier(global.generatedEs2panda._UpdateImportDefaultSpecifier(global.context, passNode(original), passNode(local)))
|
|
44
|
+
}
|
|
45
|
+
get local(): Identifier | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._ImportDefaultSpecifierLocalConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function isImportDefaultSpecifier(node: object | undefined): node is ImportDefaultSpecifier {
|
|
50
|
+
return node instanceof ImportDefaultSpecifier
|
|
51
|
+
}
|
|
52
|
+
if (!nodeByType.has(41)) {
|
|
53
|
+
nodeByType.set(41, ImportDefaultSpecifier)
|
|
54
|
+
}
|
|
@@ -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 { Expression } from "./Expression"
|
|
33
|
+
export class ImportExpression extends Expression {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 40)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createImportExpression(source?: Expression): ImportExpression {
|
|
39
|
+
return new ImportExpression(global.generatedEs2panda._CreateImportExpression(global.context, passNode(source)))
|
|
40
|
+
}
|
|
41
|
+
static updateImportExpression(original?: ImportExpression, source?: Expression): ImportExpression {
|
|
42
|
+
return new ImportExpression(global.generatedEs2panda._UpdateImportExpression(global.context, passNode(original), passNode(source)))
|
|
43
|
+
}
|
|
44
|
+
get source(): Expression | undefined {
|
|
45
|
+
return unpackNode(global.generatedEs2panda._ImportExpressionSourceConst(global.context, this.peer))
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function isImportExpression(node: object | undefined): node is ImportExpression {
|
|
49
|
+
return node instanceof ImportExpression
|
|
50
|
+
}
|
|
51
|
+
if (!nodeByType.has(40)) {
|
|
52
|
+
nodeByType.set(40, ImportExpression)
|
|
53
|
+
}
|
|
@@ -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 { Identifier } from "./Identifier"
|
|
33
|
+
import { Statement } from "./Statement"
|
|
34
|
+
export class ImportNamespaceSpecifier extends Statement {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 42)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createImportNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier {
|
|
40
|
+
return new ImportNamespaceSpecifier(global.generatedEs2panda._CreateImportNamespaceSpecifier(global.context, passNode(local)))
|
|
41
|
+
}
|
|
42
|
+
static updateImportNamespaceSpecifier(original?: ImportNamespaceSpecifier, local?: Identifier): ImportNamespaceSpecifier {
|
|
43
|
+
return new ImportNamespaceSpecifier(global.generatedEs2panda._UpdateImportNamespaceSpecifier(global.context, passNode(original), passNode(local)))
|
|
44
|
+
}
|
|
45
|
+
get local(): Identifier | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._ImportNamespaceSpecifierLocalConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function isImportNamespaceSpecifier(node: object | undefined): node is ImportNamespaceSpecifier {
|
|
50
|
+
return node instanceof ImportNamespaceSpecifier
|
|
51
|
+
}
|
|
52
|
+
if (!nodeByType.has(42)) {
|
|
53
|
+
nodeByType.set(42, ImportNamespaceSpecifier)
|
|
54
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { StringLiteral } from "./StringLiteral"
|
|
33
|
+
export class ImportSource extends ArktsObject {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
super(pointer)
|
|
36
|
+
}
|
|
37
|
+
static createImportSource(source: StringLiteral | undefined, resolvedSource: StringLiteral | undefined, hasDecl: boolean): ImportSource {
|
|
38
|
+
return new ImportSource(global.generatedEs2panda._CreateImportSource(global.context, passNode(source), passNode(resolvedSource), hasDecl))
|
|
39
|
+
}
|
|
40
|
+
get source(): StringLiteral | undefined {
|
|
41
|
+
return unpackNode(global.generatedEs2panda._ImportSourceSourceConst(global.context, this.peer))
|
|
42
|
+
}
|
|
43
|
+
get resolvedSource(): StringLiteral | undefined {
|
|
44
|
+
return unpackNode(global.generatedEs2panda._ImportSourceResolvedSourceConst(global.context, this.peer))
|
|
45
|
+
}
|
|
46
|
+
get hasDecl(): boolean {
|
|
47
|
+
return global.generatedEs2panda._ImportSourceHasDeclConst(global.context, this.peer)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { Identifier } from "./Identifier"
|
|
33
|
+
import { Statement } from "./Statement"
|
|
34
|
+
export class ImportSpecifier extends Statement {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 43)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createImportSpecifier(imported?: Identifier, local?: Identifier): ImportSpecifier {
|
|
40
|
+
return new ImportSpecifier(global.generatedEs2panda._CreateImportSpecifier(global.context, passNode(imported), passNode(local)))
|
|
41
|
+
}
|
|
42
|
+
static updateImportSpecifier(original?: ImportSpecifier, imported?: Identifier, local?: Identifier): ImportSpecifier {
|
|
43
|
+
return new ImportSpecifier(global.generatedEs2panda._UpdateImportSpecifier(global.context, passNode(original), passNode(imported), passNode(local)))
|
|
44
|
+
}
|
|
45
|
+
get imported(): Identifier | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._ImportSpecifierImportedConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
get local(): Identifier | undefined {
|
|
49
|
+
return unpackNode(global.generatedEs2panda._ImportSpecifierLocalConst(global.context, this.peer))
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export function isImportSpecifier(node: object | undefined): node is ImportSpecifier {
|
|
53
|
+
return node instanceof ImportSpecifier
|
|
54
|
+
}
|
|
55
|
+
if (!nodeByType.has(43)) {
|
|
56
|
+
nodeByType.set(43, ImportSpecifier)
|
|
57
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { TSInterfaceDeclaration } from "./TSInterfaceDeclaration"
|
|
33
|
+
export class InterfaceDecl extends TSInterfaceDeclaration {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
super(pointer)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export function isInterfaceDecl(node: object | undefined): node is InterfaceDecl {
|
|
39
|
+
return node instanceof InterfaceDecl
|
|
40
|
+
}
|
|
@@ -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 { Identifier } from "./Identifier"
|
|
33
|
+
import { Statement } from "./Statement"
|
|
34
|
+
export class LabelledStatement extends Statement {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 44)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createLabelledStatement(ident?: Identifier, body?: Statement): LabelledStatement {
|
|
40
|
+
return new LabelledStatement(global.generatedEs2panda._CreateLabelledStatement(global.context, passNode(ident), passNode(body)))
|
|
41
|
+
}
|
|
42
|
+
static updateLabelledStatement(original?: LabelledStatement, ident?: Identifier, body?: Statement): LabelledStatement {
|
|
43
|
+
return new LabelledStatement(global.generatedEs2panda._UpdateLabelledStatement(global.context, passNode(original), passNode(ident), passNode(body)))
|
|
44
|
+
}
|
|
45
|
+
get body(): Statement | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._LabelledStatementBodyConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
get ident(): Identifier | undefined {
|
|
49
|
+
return unpackNode(global.generatedEs2panda._LabelledStatementIdentConst(global.context, this.peer))
|
|
50
|
+
}
|
|
51
|
+
get referencedStatement(): AstNode | undefined {
|
|
52
|
+
return unpackNode(global.generatedEs2panda._LabelledStatementGetReferencedStatementConst(global.context, this.peer))
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export function isLabelledStatement(node: object | undefined): node is LabelledStatement {
|
|
56
|
+
return node instanceof LabelledStatement
|
|
57
|
+
}
|
|
58
|
+
if (!nodeByType.has(44)) {
|
|
59
|
+
nodeByType.set(44, LabelledStatement)
|
|
60
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 Literal extends Expression {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
super(pointer)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export function isLiteral(node: object | undefined): node is Literal {
|
|
39
|
+
return node instanceof Literal
|
|
40
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { Statement } from "./Statement"
|
|
33
|
+
export class LoopStatement extends Statement {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
super(pointer)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export function isLoopStatement(node: object | undefined): node is LoopStatement {
|
|
39
|
+
return node instanceof LoopStatement
|
|
40
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 MaybeOptionalExpression extends Expression {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
super(pointer)
|
|
36
|
+
}
|
|
37
|
+
get isOptional(): boolean {
|
|
38
|
+
return global.generatedEs2panda._MaybeOptionalExpressionIsOptionalConst(global.context, this.peer)
|
|
39
|
+
}
|
|
40
|
+
/** @deprecated */
|
|
41
|
+
clearOptional(): this {
|
|
42
|
+
global.generatedEs2panda._MaybeOptionalExpressionClearOptional(global.context, this.peer)
|
|
43
|
+
return this
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export function isMaybeOptionalExpression(node: object | undefined): node is MaybeOptionalExpression {
|
|
47
|
+
return node instanceof MaybeOptionalExpression
|
|
48
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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 { Es2pandaMemberExpressionKind } from "./../Es2pandaEnums"
|
|
33
|
+
import { Expression } from "./Expression"
|
|
34
|
+
import { MaybeOptionalExpression } from "./MaybeOptionalExpression"
|
|
35
|
+
export class MemberExpression extends MaybeOptionalExpression {
|
|
36
|
+
constructor(pointer: KNativePointer) {
|
|
37
|
+
assertValidPeer(pointer, 45)
|
|
38
|
+
super(pointer)
|
|
39
|
+
}
|
|
40
|
+
static createMemberExpression(object_arg: Expression | undefined, property: Expression | undefined, kind: Es2pandaMemberExpressionKind, computed: boolean, optional_arg: boolean): MemberExpression {
|
|
41
|
+
return new MemberExpression(global.generatedEs2panda._CreateMemberExpression(global.context, passNode(object_arg), passNode(property), kind, computed, optional_arg))
|
|
42
|
+
}
|
|
43
|
+
static updateMemberExpression(original: MemberExpression | undefined, object_arg: Expression | undefined, property: Expression | undefined, kind: Es2pandaMemberExpressionKind, computed: boolean, optional_arg: boolean): MemberExpression {
|
|
44
|
+
return new MemberExpression(global.generatedEs2panda._UpdateMemberExpression(global.context, passNode(original), passNode(object_arg), passNode(property), kind, computed, optional_arg))
|
|
45
|
+
}
|
|
46
|
+
get object(): Expression {
|
|
47
|
+
return unpackNonNullableNode(global.generatedEs2panda._MemberExpressionObjectConst(global.context, this.peer))
|
|
48
|
+
}
|
|
49
|
+
/** @deprecated */
|
|
50
|
+
setObject(object_arg?: Expression): this {
|
|
51
|
+
global.generatedEs2panda._MemberExpressionSetObject(global.context, this.peer, passNode(object_arg))
|
|
52
|
+
return this
|
|
53
|
+
}
|
|
54
|
+
/** @deprecated */
|
|
55
|
+
setProperty(prop?: Expression): this {
|
|
56
|
+
global.generatedEs2panda._MemberExpressionSetProperty(global.context, this.peer, passNode(prop))
|
|
57
|
+
return this
|
|
58
|
+
}
|
|
59
|
+
get property(): Expression {
|
|
60
|
+
return unpackNonNullableNode(global.generatedEs2panda._MemberExpressionPropertyConst(global.context, this.peer))
|
|
61
|
+
}
|
|
62
|
+
get isComputed(): boolean {
|
|
63
|
+
return global.generatedEs2panda._MemberExpressionIsComputedConst(global.context, this.peer)
|
|
64
|
+
}
|
|
65
|
+
get kind(): Es2pandaMemberExpressionKind {
|
|
66
|
+
return global.generatedEs2panda._MemberExpressionKindConst(global.context, this.peer)
|
|
67
|
+
}
|
|
68
|
+
/** @deprecated */
|
|
69
|
+
addMemberKind(kind: Es2pandaMemberExpressionKind): this {
|
|
70
|
+
global.generatedEs2panda._MemberExpressionAddMemberKind(global.context, this.peer, kind)
|
|
71
|
+
return this
|
|
72
|
+
}
|
|
73
|
+
/** @deprecated */
|
|
74
|
+
removeMemberKind(kind: Es2pandaMemberExpressionKind): this {
|
|
75
|
+
global.generatedEs2panda._MemberExpressionRemoveMemberKind(global.context, this.peer, kind)
|
|
76
|
+
return this
|
|
77
|
+
}
|
|
78
|
+
get isIgnoreBox(): boolean {
|
|
79
|
+
return global.generatedEs2panda._MemberExpressionIsIgnoreBoxConst(global.context, this.peer)
|
|
80
|
+
}
|
|
81
|
+
/** @deprecated */
|
|
82
|
+
setIgnoreBox(): this {
|
|
83
|
+
global.generatedEs2panda._MemberExpressionSetIgnoreBox(global.context, this.peer)
|
|
84
|
+
return this
|
|
85
|
+
}
|
|
86
|
+
get isPrivateReference(): boolean {
|
|
87
|
+
return global.generatedEs2panda._MemberExpressionIsPrivateReferenceConst(global.context, this.peer)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
export function isMemberExpression(node: object | undefined): node is MemberExpression {
|
|
91
|
+
return node instanceof MemberExpression
|
|
92
|
+
}
|
|
93
|
+
if (!nodeByType.has(45)) {
|
|
94
|
+
nodeByType.set(45, MemberExpression)
|
|
95
|
+
}
|