@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,82 @@
|
|
|
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 { Es2pandaPropertyKind } from "./../Es2pandaEnums"
|
|
33
|
+
import { Expression } from "./Expression"
|
|
34
|
+
import { ValidationInfo } from "./ValidationInfo"
|
|
35
|
+
export class Property extends Expression {
|
|
36
|
+
constructor(pointer: KNativePointer) {
|
|
37
|
+
assertValidPeer(pointer, 55)
|
|
38
|
+
super(pointer)
|
|
39
|
+
}
|
|
40
|
+
static create1Property(kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property {
|
|
41
|
+
return new Property(global.generatedEs2panda._CreateProperty1(global.context, kind, passNode(key), passNode(value), isMethod, isComputed))
|
|
42
|
+
}
|
|
43
|
+
static updateProperty(original?: Property, key?: Expression, value?: Expression): Property {
|
|
44
|
+
return new Property(global.generatedEs2panda._UpdateProperty(global.context, passNode(original), passNode(key), passNode(value)))
|
|
45
|
+
}
|
|
46
|
+
static update1Property(original: Property | undefined, kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property {
|
|
47
|
+
return new Property(global.generatedEs2panda._UpdateProperty1(global.context, passNode(original), kind, passNode(key), passNode(value), isMethod, isComputed))
|
|
48
|
+
}
|
|
49
|
+
get key(): Expression | undefined {
|
|
50
|
+
return unpackNode(global.generatedEs2panda._PropertyKeyConst(global.context, this.peer))
|
|
51
|
+
}
|
|
52
|
+
get value(): Expression | undefined {
|
|
53
|
+
return unpackNode(global.generatedEs2panda._PropertyValueConst(global.context, this.peer))
|
|
54
|
+
}
|
|
55
|
+
get kind(): Es2pandaPropertyKind {
|
|
56
|
+
return global.generatedEs2panda._PropertyKindConst(global.context, this.peer)
|
|
57
|
+
}
|
|
58
|
+
get isMethod(): boolean {
|
|
59
|
+
return global.generatedEs2panda._PropertyIsMethodConst(global.context, this.peer)
|
|
60
|
+
}
|
|
61
|
+
get isShorthand(): boolean {
|
|
62
|
+
return global.generatedEs2panda._PropertyIsShorthandConst(global.context, this.peer)
|
|
63
|
+
}
|
|
64
|
+
get isComputed(): boolean {
|
|
65
|
+
return global.generatedEs2panda._PropertyIsComputedConst(global.context, this.peer)
|
|
66
|
+
}
|
|
67
|
+
get isAccessor(): boolean {
|
|
68
|
+
return global.generatedEs2panda._PropertyIsAccessorConst(global.context, this.peer)
|
|
69
|
+
}
|
|
70
|
+
get convertibleToPatternProperty(): boolean {
|
|
71
|
+
return global.generatedEs2panda._PropertyConvertibleToPatternProperty(global.context, this.peer)
|
|
72
|
+
}
|
|
73
|
+
get validateExpression(): ValidationInfo | undefined {
|
|
74
|
+
return new ValidationInfo(global.generatedEs2panda._PropertyValidateExpression(global.context, this.peer))
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export function isProperty(node: object | undefined): node is Property {
|
|
78
|
+
return node instanceof Property
|
|
79
|
+
}
|
|
80
|
+
if (!nodeByType.has(55)) {
|
|
81
|
+
nodeByType.set(55, Property)
|
|
82
|
+
}
|
|
@@ -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 { Es2pandaRegExpFlags } from "./../Es2pandaEnums"
|
|
33
|
+
import { Literal } from "./Literal"
|
|
34
|
+
export class RegExpLiteral extends Literal {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 56)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createRegExpLiteral(pattern: string, flags: Es2pandaRegExpFlags, flagsStr: string): RegExpLiteral {
|
|
40
|
+
return new RegExpLiteral(global.generatedEs2panda._CreateRegExpLiteral(global.context, pattern, flags, flagsStr))
|
|
41
|
+
}
|
|
42
|
+
static updateRegExpLiteral(original: RegExpLiteral | undefined, pattern: string, flags: Es2pandaRegExpFlags, flagsStr: string): RegExpLiteral {
|
|
43
|
+
return new RegExpLiteral(global.generatedEs2panda._UpdateRegExpLiteral(global.context, passNode(original), pattern, flags, flagsStr))
|
|
44
|
+
}
|
|
45
|
+
get pattern(): string {
|
|
46
|
+
return unpackString(global.generatedEs2panda._RegExpLiteralPatternConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
get flags(): Es2pandaRegExpFlags {
|
|
49
|
+
return global.generatedEs2panda._RegExpLiteralFlagsConst(global.context, this.peer)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export function isRegExpLiteral(node: object | undefined): node is RegExpLiteral {
|
|
53
|
+
return node instanceof RegExpLiteral
|
|
54
|
+
}
|
|
55
|
+
if (!nodeByType.has(56)) {
|
|
56
|
+
nodeByType.set(56, RegExpLiteral)
|
|
57
|
+
}
|
|
@@ -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 { Statement } from "./Statement"
|
|
34
|
+
export class ReturnStatement extends Statement {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 58)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static create1ReturnStatement(argument?: Expression): ReturnStatement {
|
|
40
|
+
return new ReturnStatement(global.generatedEs2panda._CreateReturnStatement1(global.context, passNode(argument)))
|
|
41
|
+
}
|
|
42
|
+
static updateReturnStatement(original?: ReturnStatement): ReturnStatement {
|
|
43
|
+
return new ReturnStatement(global.generatedEs2panda._UpdateReturnStatement(global.context, passNode(original)))
|
|
44
|
+
}
|
|
45
|
+
static update1ReturnStatement(original?: ReturnStatement, argument?: Expression): ReturnStatement {
|
|
46
|
+
return new ReturnStatement(global.generatedEs2panda._UpdateReturnStatement1(global.context, passNode(original), passNode(argument)))
|
|
47
|
+
}
|
|
48
|
+
get argument(): Expression | undefined {
|
|
49
|
+
return unpackNode(global.generatedEs2panda._ReturnStatementArgumentConst(global.context, this.peer))
|
|
50
|
+
}
|
|
51
|
+
/** @deprecated */
|
|
52
|
+
setArgument(arg?: Expression): this {
|
|
53
|
+
global.generatedEs2panda._ReturnStatementSetArgument(global.context, this.peer, passNode(arg))
|
|
54
|
+
return this
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export function isReturnStatement(node: object | undefined): node is ReturnStatement {
|
|
58
|
+
return node instanceof ReturnStatement
|
|
59
|
+
}
|
|
60
|
+
if (!nodeByType.has(58)) {
|
|
61
|
+
nodeByType.set(58, ReturnStatement)
|
|
62
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
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 { AnnotationUsage } from "./AnnotationUsage"
|
|
33
|
+
import { Es2pandaModifierFlags } from "./../Es2pandaEnums"
|
|
34
|
+
import { Es2pandaScriptFunctionFlags } from "./../Es2pandaEnums"
|
|
35
|
+
import { Expression } from "./Expression"
|
|
36
|
+
import { FunctionSignature } from "./FunctionSignature"
|
|
37
|
+
import { Identifier } from "./Identifier"
|
|
38
|
+
import { ReturnStatement } from "./ReturnStatement"
|
|
39
|
+
import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration"
|
|
40
|
+
import { TypeNode } from "./TypeNode"
|
|
41
|
+
export class ScriptFunction extends AstNode {
|
|
42
|
+
constructor(pointer: KNativePointer) {
|
|
43
|
+
assertValidPeer(pointer, 59)
|
|
44
|
+
super(pointer)
|
|
45
|
+
}
|
|
46
|
+
static createScriptFunction(databody: AstNode | undefined, datasignature: FunctionSignature | undefined, datafuncFlags: number, dataflags: number): ScriptFunction {
|
|
47
|
+
return new ScriptFunction(global.generatedEs2panda._CreateScriptFunction(global.context, passNode(databody), passNode(datasignature), datafuncFlags, dataflags))
|
|
48
|
+
}
|
|
49
|
+
static updateScriptFunction(original: ScriptFunction | undefined, databody: AstNode | undefined, datasignature: FunctionSignature | undefined, datafuncFlags: number, dataflags: number): ScriptFunction {
|
|
50
|
+
return new ScriptFunction(global.generatedEs2panda._UpdateScriptFunction(global.context, passNode(original), passNode(databody), passNode(datasignature), datafuncFlags, dataflags))
|
|
51
|
+
}
|
|
52
|
+
get id(): Identifier | undefined {
|
|
53
|
+
return unpackNode(global.generatedEs2panda._ScriptFunctionIdConst(global.context, this.peer))
|
|
54
|
+
}
|
|
55
|
+
get params(): readonly Expression[] {
|
|
56
|
+
return unpackNodeArray(global.generatedEs2panda._ScriptFunctionParamsConst(global.context, this.peer))
|
|
57
|
+
}
|
|
58
|
+
get returnStatements(): readonly ReturnStatement[] {
|
|
59
|
+
return unpackNodeArray(global.generatedEs2panda._ScriptFunctionReturnStatementsConst(global.context, this.peer))
|
|
60
|
+
}
|
|
61
|
+
get typeParams(): TSTypeParameterDeclaration | undefined {
|
|
62
|
+
return unpackNode(global.generatedEs2panda._ScriptFunctionTypeParamsConst(global.context, this.peer))
|
|
63
|
+
}
|
|
64
|
+
get body(): AstNode | undefined {
|
|
65
|
+
return unpackNode(global.generatedEs2panda._ScriptFunctionBodyConst(global.context, this.peer))
|
|
66
|
+
}
|
|
67
|
+
/** @deprecated */
|
|
68
|
+
addReturnStatement(returnStatement?: ReturnStatement): this {
|
|
69
|
+
global.generatedEs2panda._ScriptFunctionAddReturnStatement(global.context, this.peer, passNode(returnStatement))
|
|
70
|
+
return this
|
|
71
|
+
}
|
|
72
|
+
/** @deprecated */
|
|
73
|
+
setBody(body?: AstNode): this {
|
|
74
|
+
global.generatedEs2panda._ScriptFunctionSetBody(global.context, this.peer, passNode(body))
|
|
75
|
+
return this
|
|
76
|
+
}
|
|
77
|
+
get returnTypeAnnotation(): TypeNode | undefined {
|
|
78
|
+
return unpackNode(global.generatedEs2panda._ScriptFunctionReturnTypeAnnotationConst(global.context, this.peer))
|
|
79
|
+
}
|
|
80
|
+
/** @deprecated */
|
|
81
|
+
setReturnTypeAnnotation(node?: TypeNode): this {
|
|
82
|
+
global.generatedEs2panda._ScriptFunctionSetReturnTypeAnnotation(global.context, this.peer, passNode(node))
|
|
83
|
+
return this
|
|
84
|
+
}
|
|
85
|
+
get isEntryPoint(): boolean {
|
|
86
|
+
return global.generatedEs2panda._ScriptFunctionIsEntryPointConst(global.context, this.peer)
|
|
87
|
+
}
|
|
88
|
+
get isGenerator(): boolean {
|
|
89
|
+
return global.generatedEs2panda._ScriptFunctionIsGeneratorConst(global.context, this.peer)
|
|
90
|
+
}
|
|
91
|
+
get isAsyncFunc(): boolean {
|
|
92
|
+
return global.generatedEs2panda._ScriptFunctionIsAsyncFuncConst(global.context, this.peer)
|
|
93
|
+
}
|
|
94
|
+
get isAsyncImplFunc(): boolean {
|
|
95
|
+
return global.generatedEs2panda._ScriptFunctionIsAsyncImplFuncConst(global.context, this.peer)
|
|
96
|
+
}
|
|
97
|
+
get isArrow(): boolean {
|
|
98
|
+
return global.generatedEs2panda._ScriptFunctionIsArrowConst(global.context, this.peer)
|
|
99
|
+
}
|
|
100
|
+
get isOverload(): boolean {
|
|
101
|
+
return global.generatedEs2panda._ScriptFunctionIsOverloadConst(global.context, this.peer)
|
|
102
|
+
}
|
|
103
|
+
get isExternalOverload(): boolean {
|
|
104
|
+
return global.generatedEs2panda._ScriptFunctionIsExternalOverloadConst(global.context, this.peer)
|
|
105
|
+
}
|
|
106
|
+
get isConstructor(): boolean {
|
|
107
|
+
return global.generatedEs2panda._ScriptFunctionIsConstructorConst(global.context, this.peer)
|
|
108
|
+
}
|
|
109
|
+
get isGetter(): boolean {
|
|
110
|
+
return global.generatedEs2panda._ScriptFunctionIsGetterConst(global.context, this.peer)
|
|
111
|
+
}
|
|
112
|
+
get isSetter(): boolean {
|
|
113
|
+
return global.generatedEs2panda._ScriptFunctionIsSetterConst(global.context, this.peer)
|
|
114
|
+
}
|
|
115
|
+
get isExtensionAccessor(): boolean {
|
|
116
|
+
return global.generatedEs2panda._ScriptFunctionIsExtensionAccessorConst(global.context, this.peer)
|
|
117
|
+
}
|
|
118
|
+
get isMethod(): boolean {
|
|
119
|
+
return global.generatedEs2panda._ScriptFunctionIsMethodConst(global.context, this.peer)
|
|
120
|
+
}
|
|
121
|
+
get isProxy(): boolean {
|
|
122
|
+
return global.generatedEs2panda._ScriptFunctionIsProxyConst(global.context, this.peer)
|
|
123
|
+
}
|
|
124
|
+
get isStaticBlock(): boolean {
|
|
125
|
+
return global.generatedEs2panda._ScriptFunctionIsStaticBlockConst(global.context, this.peer)
|
|
126
|
+
}
|
|
127
|
+
get isEnum(): boolean {
|
|
128
|
+
return global.generatedEs2panda._ScriptFunctionIsEnumConst(global.context, this.peer)
|
|
129
|
+
}
|
|
130
|
+
get isHidden(): boolean {
|
|
131
|
+
return global.generatedEs2panda._ScriptFunctionIsHiddenConst(global.context, this.peer)
|
|
132
|
+
}
|
|
133
|
+
get isExternal(): boolean {
|
|
134
|
+
return global.generatedEs2panda._ScriptFunctionIsExternalConst(global.context, this.peer)
|
|
135
|
+
}
|
|
136
|
+
get isImplicitSuperCallNeeded(): boolean {
|
|
137
|
+
return global.generatedEs2panda._ScriptFunctionIsImplicitSuperCallNeededConst(global.context, this.peer)
|
|
138
|
+
}
|
|
139
|
+
get hasBody(): boolean {
|
|
140
|
+
return global.generatedEs2panda._ScriptFunctionHasBodyConst(global.context, this.peer)
|
|
141
|
+
}
|
|
142
|
+
get hasRestParameter(): boolean {
|
|
143
|
+
return global.generatedEs2panda._ScriptFunctionHasRestParameterConst(global.context, this.peer)
|
|
144
|
+
}
|
|
145
|
+
get hasReturnStatement(): boolean {
|
|
146
|
+
return global.generatedEs2panda._ScriptFunctionHasReturnStatementConst(global.context, this.peer)
|
|
147
|
+
}
|
|
148
|
+
get hasThrowStatement(): boolean {
|
|
149
|
+
return global.generatedEs2panda._ScriptFunctionHasThrowStatementConst(global.context, this.peer)
|
|
150
|
+
}
|
|
151
|
+
get isThrowing(): boolean {
|
|
152
|
+
return global.generatedEs2panda._ScriptFunctionIsThrowingConst(global.context, this.peer)
|
|
153
|
+
}
|
|
154
|
+
get isRethrowing(): boolean {
|
|
155
|
+
return global.generatedEs2panda._ScriptFunctionIsRethrowingConst(global.context, this.peer)
|
|
156
|
+
}
|
|
157
|
+
get isDynamic(): boolean {
|
|
158
|
+
return global.generatedEs2panda._ScriptFunctionIsDynamicConst(global.context, this.peer)
|
|
159
|
+
}
|
|
160
|
+
get isExtensionMethod(): boolean {
|
|
161
|
+
return global.generatedEs2panda._ScriptFunctionIsExtensionMethodConst(global.context, this.peer)
|
|
162
|
+
}
|
|
163
|
+
get flags(): Es2pandaScriptFunctionFlags {
|
|
164
|
+
return global.generatedEs2panda._ScriptFunctionFlagsConst(global.context, this.peer)
|
|
165
|
+
}
|
|
166
|
+
get hasReceiver(): boolean {
|
|
167
|
+
return global.generatedEs2panda._ScriptFunctionHasReceiverConst(global.context, this.peer)
|
|
168
|
+
}
|
|
169
|
+
/** @deprecated */
|
|
170
|
+
setIdent(id: Identifier): this {
|
|
171
|
+
global.generatedEs2panda._ScriptFunctionSetIdent(global.context, this.peer, passNode(id))
|
|
172
|
+
return this
|
|
173
|
+
}
|
|
174
|
+
/** @deprecated */
|
|
175
|
+
addFlag(flags: Es2pandaScriptFunctionFlags): this {
|
|
176
|
+
global.generatedEs2panda._ScriptFunctionAddFlag(global.context, this.peer, flags)
|
|
177
|
+
return this
|
|
178
|
+
}
|
|
179
|
+
/** @deprecated */
|
|
180
|
+
addModifier(flags: Es2pandaModifierFlags): this {
|
|
181
|
+
global.generatedEs2panda._ScriptFunctionAddModifier(global.context, this.peer, flags)
|
|
182
|
+
return this
|
|
183
|
+
}
|
|
184
|
+
get formalParamsLength(): number {
|
|
185
|
+
return global.generatedEs2panda._ScriptFunctionFormalParamsLengthConst(global.context, this.peer)
|
|
186
|
+
}
|
|
187
|
+
get annotations(): readonly AnnotationUsage[] {
|
|
188
|
+
return unpackNodeArray(global.generatedEs2panda._ScriptFunctionAnnotationsConst(global.context, this.peer))
|
|
189
|
+
}
|
|
190
|
+
/** @deprecated */
|
|
191
|
+
setAnnotations(annotations: readonly AnnotationUsage[]): this {
|
|
192
|
+
global.generatedEs2panda._ScriptFunctionSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length)
|
|
193
|
+
return this
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
export function isScriptFunction(node: object | undefined): node is ScriptFunction {
|
|
197
|
+
return node instanceof ScriptFunction
|
|
198
|
+
}
|
|
199
|
+
if (!nodeByType.has(59)) {
|
|
200
|
+
nodeByType.set(59, ScriptFunction)
|
|
201
|
+
}
|
|
@@ -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 SequenceExpression extends Expression {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 60)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createSequenceExpression(sequence_arg: readonly Expression[]): SequenceExpression {
|
|
39
|
+
return new SequenceExpression(global.generatedEs2panda._CreateSequenceExpression(global.context, passNodeArray(sequence_arg), sequence_arg.length))
|
|
40
|
+
}
|
|
41
|
+
static updateSequenceExpression(original: SequenceExpression | undefined, sequence_arg: readonly Expression[]): SequenceExpression {
|
|
42
|
+
return new SequenceExpression(global.generatedEs2panda._UpdateSequenceExpression(global.context, passNode(original), passNodeArray(sequence_arg), sequence_arg.length))
|
|
43
|
+
}
|
|
44
|
+
get sequence(): readonly Expression[] {
|
|
45
|
+
return unpackNodeArray(global.generatedEs2panda._SequenceExpressionSequenceConst(global.context, this.peer))
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function isSequenceExpression(node: object | undefined): node is SequenceExpression {
|
|
49
|
+
return node instanceof SequenceExpression
|
|
50
|
+
}
|
|
51
|
+
if (!nodeByType.has(60)) {
|
|
52
|
+
nodeByType.set(60, SequenceExpression)
|
|
53
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 { AnnotatedExpression } from "./AnnotatedExpression"
|
|
33
|
+
import { Decorator } from "./Decorator"
|
|
34
|
+
import { Expression } from "./Expression"
|
|
35
|
+
import { TypeNode } from "./TypeNode"
|
|
36
|
+
import { ValidationInfo } from "./ValidationInfo"
|
|
37
|
+
export class SpreadElement extends AnnotatedExpression {
|
|
38
|
+
constructor(pointer: KNativePointer) {
|
|
39
|
+
assertValidPeer(pointer, 162)
|
|
40
|
+
super(pointer)
|
|
41
|
+
}
|
|
42
|
+
static createSpreadElement(nodeType: Es2pandaAstNodeType, argument?: Expression): SpreadElement {
|
|
43
|
+
return new SpreadElement(global.generatedEs2panda._CreateSpreadElement(global.context, nodeType, passNode(argument)))
|
|
44
|
+
}
|
|
45
|
+
static updateSpreadElement(original: SpreadElement | undefined, nodeType: Es2pandaAstNodeType, argument?: Expression): SpreadElement {
|
|
46
|
+
return new SpreadElement(global.generatedEs2panda._UpdateSpreadElement(global.context, passNode(original), nodeType, passNode(argument)))
|
|
47
|
+
}
|
|
48
|
+
get argument(): Expression | undefined {
|
|
49
|
+
return unpackNode(global.generatedEs2panda._SpreadElementArgumentConst(global.context, this.peer))
|
|
50
|
+
}
|
|
51
|
+
get isOptional(): boolean {
|
|
52
|
+
return global.generatedEs2panda._SpreadElementIsOptionalConst(global.context, this.peer)
|
|
53
|
+
}
|
|
54
|
+
get decorators(): readonly Decorator[] {
|
|
55
|
+
return unpackNodeArray(global.generatedEs2panda._SpreadElementDecoratorsConst(global.context, this.peer))
|
|
56
|
+
}
|
|
57
|
+
/** @deprecated */
|
|
58
|
+
setOptional(optional_arg: boolean): this {
|
|
59
|
+
global.generatedEs2panda._SpreadElementSetOptional(global.context, this.peer, optional_arg)
|
|
60
|
+
return this
|
|
61
|
+
}
|
|
62
|
+
get validateExpression(): ValidationInfo | undefined {
|
|
63
|
+
return new ValidationInfo(global.generatedEs2panda._SpreadElementValidateExpression(global.context, this.peer))
|
|
64
|
+
}
|
|
65
|
+
get typeAnnotation(): TypeNode | undefined {
|
|
66
|
+
return unpackNode(global.generatedEs2panda._SpreadElementTypeAnnotationConst(global.context, this.peer))
|
|
67
|
+
}
|
|
68
|
+
/** @deprecated */
|
|
69
|
+
setTsTypeAnnotation(typeAnnotation?: TypeNode): this {
|
|
70
|
+
global.generatedEs2panda._SpreadElementSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation))
|
|
71
|
+
return this
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export function isSpreadElement(node: object | undefined): node is SpreadElement {
|
|
75
|
+
return node instanceof SpreadElement
|
|
76
|
+
}
|
|
77
|
+
if (!nodeByType.has(162)) {
|
|
78
|
+
nodeByType.set(162, SpreadElement)
|
|
79
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
export class SrcDumper extends ArktsObject {
|
|
33
|
+
constructor(pointer: KNativePointer) {
|
|
34
|
+
super(pointer)
|
|
35
|
+
}
|
|
36
|
+
static createSrcDumper(node?: AstNode): SrcDumper {
|
|
37
|
+
return new SrcDumper(global.generatedEs2panda._CreateSrcDumper(global.context, passNode(node)))
|
|
38
|
+
}
|
|
39
|
+
/** @deprecated */
|
|
40
|
+
add(str: string): this {
|
|
41
|
+
global.generatedEs2panda._SrcDumperAdd(global.context, this.peer, str)
|
|
42
|
+
return this
|
|
43
|
+
}
|
|
44
|
+
/** @deprecated */
|
|
45
|
+
add1(i: number): this {
|
|
46
|
+
global.generatedEs2panda._SrcDumperAdd1(global.context, this.peer, i)
|
|
47
|
+
return this
|
|
48
|
+
}
|
|
49
|
+
/** @deprecated */
|
|
50
|
+
add2(l: number): this {
|
|
51
|
+
global.generatedEs2panda._SrcDumperAdd2(global.context, this.peer, l)
|
|
52
|
+
return this
|
|
53
|
+
}
|
|
54
|
+
/** @deprecated */
|
|
55
|
+
add3(f: number): this {
|
|
56
|
+
global.generatedEs2panda._SrcDumperAdd3(global.context, this.peer, f)
|
|
57
|
+
return this
|
|
58
|
+
}
|
|
59
|
+
/** @deprecated */
|
|
60
|
+
add4(d: number): this {
|
|
61
|
+
global.generatedEs2panda._SrcDumperAdd4(global.context, this.peer, d)
|
|
62
|
+
return this
|
|
63
|
+
}
|
|
64
|
+
get str(): string {
|
|
65
|
+
return unpackString(global.generatedEs2panda._SrcDumperStrConst(global.context, this.peer))
|
|
66
|
+
}
|
|
67
|
+
/** @deprecated */
|
|
68
|
+
incrIndent(): this {
|
|
69
|
+
global.generatedEs2panda._SrcDumperIncrIndent(global.context, this.peer)
|
|
70
|
+
return this
|
|
71
|
+
}
|
|
72
|
+
/** @deprecated */
|
|
73
|
+
decrIndent(): this {
|
|
74
|
+
global.generatedEs2panda._SrcDumperDecrIndent(global.context, this.peer)
|
|
75
|
+
return this
|
|
76
|
+
}
|
|
77
|
+
/** @deprecated */
|
|
78
|
+
endl(num: number): this {
|
|
79
|
+
global.generatedEs2panda._SrcDumperEndl(global.context, this.peer, num)
|
|
80
|
+
return this
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
export class Statement extends AstNode {
|
|
33
|
+
constructor(pointer: KNativePointer) {
|
|
34
|
+
super(pointer)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export function isStatement(node: object | undefined): node is Statement {
|
|
38
|
+
return node instanceof Statement
|
|
39
|
+
}
|