@idlizer/arktscgen 2.1.10-arktscgen-4 → 2.1.10-arktscgen-6
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 +24 -47
- package/build/libarkts-copy/native/meson.build +26 -10
- package/build/libarkts-copy/native/meson_options.txt +9 -3
- package/build/libarkts-copy/native/mingw.cross +2 -0
- package/build/libarkts-copy/native/src/bridges.cc +55 -159
- package/build/libarkts-copy/native/src/common.cc +316 -97
- package/build/libarkts-copy/native/src/common.h +22 -22
- package/build/libarkts-copy/native/src/memoryTracker.cc +5 -5
- package/build/libarkts-copy/native/src/memoryTracker.h +5 -5
- package/build/libarkts-copy/package.json +31 -25
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +139 -116
- package/build/libarkts-copy/src/InteropNativeModule.ts +18 -15
- package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +24 -19
- package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +30 -31
- package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +30 -18
- package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +30 -12
- package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +38 -29
- package/build/libarkts-copy/src/arkts-api/index.ts +23 -24
- package/build/libarkts-copy/src/arkts-api/node-cache.ts +22 -13
- package/build/libarkts-copy/src/arkts-api/node-utilities/ArkTsConfig.ts +8 -8
- package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +9 -21
- package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +12 -14
- package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +5 -5
- package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +26 -24
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +62 -32
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +14 -13
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +24 -21
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +10 -12
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +14 -18
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +15 -16
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +5 -8
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +6 -12
- package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +12 -11
- package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +14 -33
- package/build/libarkts-copy/src/arkts-api/node-utilities/NumberLiteral.ts +12 -23
- package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +17 -21
- package/build/libarkts-copy/src/arkts-api/node-utilities/OpaqueTypeNode.ts +9 -8
- package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +21 -16
- package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +52 -53
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +22 -32
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +12 -14
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +10 -12
- package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +10 -9
- package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +10 -12
- package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +8 -8
- package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +53 -65
- package/build/libarkts-copy/src/arkts-api/peers/Config.ts +18 -25
- package/build/libarkts-copy/src/arkts-api/peers/Context.ts +35 -42
- package/build/libarkts-copy/src/arkts-api/peers/ExternalSource.ts +9 -9
- package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +6 -8
- package/build/libarkts-copy/src/arkts-api/peers/Options.ts +8 -8
- package/build/libarkts-copy/src/arkts-api/plugins.ts +205 -32
- package/build/libarkts-copy/src/arkts-api/static/global.ts +35 -36
- package/build/libarkts-copy/src/arkts-api/static/globalUtils.ts +5 -5
- package/build/libarkts-copy/src/arkts-api/static/profiler.ts +107 -91
- package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +54 -37
- package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +86 -69
- package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +41 -24
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +69 -62
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +254 -175
- package/build/libarkts-copy/src/arkts-api/visitor.ts +599 -756
- package/build/libarkts-copy/src/arkts-api/wrapper-compat.ts +8 -8
- package/build/libarkts-copy/src/checkSdk.ts +15 -18
- package/build/libarkts-copy/src/index.ts +29 -29
- package/build/libarkts-copy/src/memo-node-cache.ts +143 -0
- package/build/libarkts-copy/src/plugin-utils.ts +64 -45
- package/build/libarkts-copy/src/reexport-for-generated.ts +13 -10
- package/build/libarkts-copy/src/tracer.ts +76 -70
- package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +134 -274
- package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +23 -23
- package/build/libarkts-copy/src/ts-api/index.ts +27 -35
- package/build/libarkts-copy/src/ts-api/static/enums.ts +3 -3
- package/build/libarkts-copy/src/ts-api/types.ts +535 -395
- package/build/libarkts-copy/src/ts-api/utilities/private.ts +116 -113
- package/build/libarkts-copy/src/ts-api/utilities/public.ts +18 -18
- package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +33 -49
- package/build/libarkts-copy/src/utils.ts +103 -80
- package/build/libarkts-copy/tsconfig.json +3 -2
- package/lib/index.js +2713 -7729
- package/package.json +53 -52
- package/templates/Es2pandaNativeModule.ts +1 -0
- package/templates/peer.ts +1 -0
- package/build/libarkts-copy/native/src/generated/bridges.cc +0 -16375
- package/build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts +0 -24
- package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +0 -1344
- package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +0 -5192
- package/build/libarkts-copy/src/generated/factory.ts +0 -1285
- package/build/libarkts-copy/src/generated/index.ts +0 -222
- package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -44
- package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -54
- package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -45
- package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +0 -165
- package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +0 -84
- package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +0 -73
- package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -109
- package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +0 -119
- package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -65
- package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -111
- package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -49
- package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -110
- package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -72
- package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -94
- package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/CallExpression.ts +0 -129
- package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -74
- package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +0 -76
- package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +0 -365
- package/build/libarkts-copy/src/generated/peers/ClassElement.ts +0 -76
- package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +0 -137
- package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -82
- package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -60
- package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +0 -102
- package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -90
- package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/ETSModule.ts +0 -129
- package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -79
- package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -59
- package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +0 -189
- package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +0 -55
- package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -59
- package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -89
- package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +0 -63
- package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -64
- package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +0 -94
- package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +0 -82
- package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -84
- package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -67
- package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -72
- package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -67
- package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +0 -106
- package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +0 -74
- package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -162
- package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +0 -87
- package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +0 -73
- package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -53
- package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -45
- package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -53
- package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -115
- package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +0 -152
- package/build/libarkts-copy/src/generated/peers/NamedType.ts +0 -84
- package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -64
- package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -94
- package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -101
- package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -65
- package/build/libarkts-copy/src/generated/peers/Program.ts +0 -206
- package/build/libarkts-copy/src/generated/peers/Property.ts +0 -92
- package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -65
- package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +0 -310
- package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +0 -48
- package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -83
- package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -120
- package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -44
- package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -84
- package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +0 -73
- package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +0 -112
- package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -76
- package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/TSImportType.ts +0 -72
- package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -73
- package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -64
- package/build/libarkts-copy/src/generated/peers/TSInferType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +0 -160
- package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +0 -72
- package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +0 -79
- package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -74
- package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -80
- package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +0 -151
- package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +0 -121
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TryStatement.ts +0 -89
- package/build/libarkts-copy/src/generated/peers/TypeNode.ts +0 -81
- package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -44
- package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -45
- package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -50
- package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +0 -113
- package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -79
- package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -64
|
@@ -13,13 +13,10 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { Expression, MethodDefinition } from
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} from "../../generated/Es2pandaEnums"
|
|
21
|
-
import { isSameNativeObject } from "../peers/ArktsObject"
|
|
22
|
-
import { updateNodeByNode } from "../utilities/private"
|
|
16
|
+
import { Expression, MethodDefinition } from '../../../generated';
|
|
17
|
+
import { Es2pandaMethodDefinitionKind, Es2pandaModifierFlags } from '../../../generated/Es2pandaEnums';
|
|
18
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
19
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
23
20
|
|
|
24
21
|
export function createMethodDefinition(
|
|
25
22
|
kind: Es2pandaMethodDefinitionKind,
|
|
@@ -29,14 +26,7 @@ export function createMethodDefinition(
|
|
|
29
26
|
isComputed: boolean,
|
|
30
27
|
overloads?: readonly MethodDefinition[]
|
|
31
28
|
): MethodDefinition {
|
|
32
|
-
return MethodDefinition.createMethodDefinition(
|
|
33
|
-
kind,
|
|
34
|
-
key,
|
|
35
|
-
value,
|
|
36
|
-
modifiers,
|
|
37
|
-
isComputed,
|
|
38
|
-
overloads,
|
|
39
|
-
)
|
|
29
|
+
return MethodDefinition.createMethodDefinition(kind, key, value, modifiers, isComputed, overloads);
|
|
40
30
|
}
|
|
41
31
|
|
|
42
32
|
export function updateMethodDefinition(
|
|
@@ -48,24 +38,15 @@ export function updateMethodDefinition(
|
|
|
48
38
|
isComputed: boolean,
|
|
49
39
|
overloads?: readonly MethodDefinition[]
|
|
50
40
|
): MethodDefinition {
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
41
|
+
if (
|
|
42
|
+
isSameNativeObject(kind, original.kind) &&
|
|
43
|
+
isSameNativeObject(key, original.key) &&
|
|
44
|
+
isSameNativeObject(value, original.value) &&
|
|
45
|
+
isSameNativeObject(modifiers, original.modifierFlags) &&
|
|
46
|
+
isSameNativeObject(isComputed, original.isComputed) &&
|
|
47
|
+
isSameNativeObject(overloads, original.overloads)
|
|
57
48
|
) {
|
|
58
|
-
return original
|
|
49
|
+
return original;
|
|
59
50
|
}
|
|
60
|
-
return updateNodeByNode(
|
|
61
|
-
createMethodDefinition(
|
|
62
|
-
kind,
|
|
63
|
-
key,
|
|
64
|
-
value,
|
|
65
|
-
modifiers,
|
|
66
|
-
isComputed,
|
|
67
|
-
overloads,
|
|
68
|
-
),
|
|
69
|
-
original
|
|
70
|
-
)
|
|
51
|
+
return updateNodeByNode(createMethodDefinition(kind, key, value, modifiers, isComputed, overloads), original);
|
|
71
52
|
}
|
|
@@ -13,33 +13,22 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { global } from
|
|
17
|
-
import { NumberLiteral } from
|
|
18
|
-
import { isSameNativeObject } from
|
|
19
|
-
import { updateNodeByNode } from
|
|
20
|
-
import { Es2pandaAstNodeType } from
|
|
16
|
+
import { global } from '../static/global';
|
|
17
|
+
import { NumberLiteral } from '../../../generated';
|
|
18
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
19
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
20
|
+
import { Es2pandaAstNodeType } from '../../../generated/Es2pandaEnums';
|
|
21
21
|
|
|
22
|
-
export function createNumberLiteral(
|
|
23
|
-
value: number
|
|
24
|
-
): NumberLiteral {
|
|
22
|
+
export function createNumberLiteral(value: number): NumberLiteral {
|
|
25
23
|
return new NumberLiteral(
|
|
26
|
-
global.es2panda._CreateNumberLiteral(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
),
|
|
30
|
-
Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL,
|
|
31
|
-
)
|
|
24
|
+
global.es2panda._CreateNumberLiteral(global.context, value),
|
|
25
|
+
Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL
|
|
26
|
+
);
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
export function updateNumberLiteral(
|
|
35
|
-
original: NumberLiteral,
|
|
36
|
-
value: number
|
|
37
|
-
): NumberLiteral {
|
|
29
|
+
export function updateNumberLiteral(original: NumberLiteral, value: number): NumberLiteral {
|
|
38
30
|
if (isSameNativeObject(value.toString(), original.str)) {
|
|
39
|
-
return original
|
|
31
|
+
return original;
|
|
40
32
|
}
|
|
41
|
-
return updateNodeByNode(
|
|
42
|
-
createNumberLiteral(value),
|
|
43
|
-
original
|
|
44
|
-
)
|
|
33
|
+
return updateNodeByNode(createNumberLiteral(value), original);
|
|
45
34
|
}
|
|
@@ -13,41 +13,37 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { KNativePointer } from
|
|
17
|
-
import { ObjectExpression, Expression } from
|
|
18
|
-
import { isSameNativeObject } from
|
|
19
|
-
import { updateNodeByNode } from
|
|
20
|
-
import { Es2pandaAstNodeType } from
|
|
16
|
+
import { KNativePointer } from '@koalaui/interop';
|
|
17
|
+
import { ObjectExpression, Expression } from '../../../generated';
|
|
18
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
19
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
20
|
+
import { Es2pandaAstNodeType } from '../../../generated/Es2pandaEnums';
|
|
21
21
|
|
|
22
22
|
export function createObjectExpression(
|
|
23
23
|
properties: readonly Expression[],
|
|
24
|
-
preferredReturnType?: KNativePointer
|
|
24
|
+
preferredReturnType?: KNativePointer
|
|
25
25
|
): ObjectExpression {
|
|
26
26
|
const result = ObjectExpression.createObjectExpression(
|
|
27
27
|
Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION,
|
|
28
28
|
properties,
|
|
29
|
-
false
|
|
30
|
-
)
|
|
29
|
+
false // Improve: provide trailingComma value from native module through ObjectExpression?
|
|
30
|
+
);
|
|
31
31
|
if (preferredReturnType) {
|
|
32
|
-
result.setPreferredTypePointer(preferredReturnType)
|
|
32
|
+
result.setPreferredTypePointer(preferredReturnType);
|
|
33
33
|
}
|
|
34
|
-
return result
|
|
34
|
+
return result;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export function updateObjectExpression(
|
|
38
38
|
original: ObjectExpression,
|
|
39
39
|
properties: readonly Expression[],
|
|
40
|
-
preferredReturnType?: KNativePointer
|
|
40
|
+
preferredReturnType?: KNativePointer
|
|
41
41
|
): ObjectExpression {
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
if (
|
|
43
|
+
isSameNativeObject(properties, original.properties) &&
|
|
44
|
+
preferredReturnType === original.getPreferredTypePointer()
|
|
45
|
+
) {
|
|
46
|
+
return original;
|
|
45
47
|
}
|
|
46
|
-
return updateNodeByNode(
|
|
47
|
-
createObjectExpression(
|
|
48
|
-
properties,
|
|
49
|
-
preferredReturnType
|
|
50
|
-
),
|
|
51
|
-
original
|
|
52
|
-
)
|
|
48
|
+
return updateNodeByNode(createObjectExpression(properties, preferredReturnType), original);
|
|
53
49
|
}
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { KNativePointer } from
|
|
17
|
-
import { global } from
|
|
18
|
-
import { OpaqueTypeNode } from
|
|
19
|
-
import { Es2pandaAstNodeType } from
|
|
16
|
+
import { KNativePointer } from '@koalaui/interop';
|
|
17
|
+
import { global } from '../static/global';
|
|
18
|
+
import { OpaqueTypeNode } from '../../../generated';
|
|
19
|
+
import { Es2pandaAstNodeType } from '../../../generated/Es2pandaEnums';
|
|
20
20
|
|
|
21
|
-
export function createOpaqueTypeNode(
|
|
22
|
-
|
|
23
|
-
)
|
|
24
|
-
|
|
21
|
+
export function createOpaqueTypeNode(typePointer: KNativePointer): OpaqueTypeNode {
|
|
22
|
+
return new OpaqueTypeNode(
|
|
23
|
+
global.es2panda._Checker_CreateOpaqueTypeNode(global.context, typePointer),
|
|
24
|
+
Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE
|
|
25
|
+
);
|
|
25
26
|
}
|
|
@@ -13,28 +13,33 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { Program } from
|
|
17
|
-
import { traceGlobal } from
|
|
16
|
+
import { Program } from '../../../generated';
|
|
17
|
+
import { traceGlobal } from '../../tracer';
|
|
18
18
|
|
|
19
19
|
export function dumpProgramInfo(program: Program) {
|
|
20
|
-
traceGlobal(() => `Program info:`)
|
|
21
|
-
traceGlobal(() => `\tAbsoluteName: ${program.absoluteName}`)
|
|
22
|
-
traceGlobal(() => `\tFileName: ${program.fileName}`)
|
|
23
|
-
traceGlobal(() => `\tFileNameWithExtension: ${program.fileNameWithExtension}`)
|
|
24
|
-
traceGlobal(() => `\tModuleName: ${program.moduleName}`)
|
|
25
|
-
traceGlobal(() => `\tModulePrefix: ${program.modulePrefix}`)
|
|
26
|
-
traceGlobal(() => `\tRelativeFilePath: ${program.relativeFilePath}`)
|
|
27
|
-
traceGlobal(() => `\tResolvedFilePath: ${program.resolvedFilePath}`)
|
|
28
|
-
traceGlobal(() => `\tSourceFileFolder: ${program.sourceFileFolder}`)
|
|
29
|
-
traceGlobal(() => `\tSourceFilePath: ${program.sourceFilePath}`)
|
|
20
|
+
traceGlobal(() => `Program info:`);
|
|
21
|
+
traceGlobal(() => `\tAbsoluteName: ${program.absoluteName}`);
|
|
22
|
+
traceGlobal(() => `\tFileName: ${program.fileName}`);
|
|
23
|
+
traceGlobal(() => `\tFileNameWithExtension: ${program.fileNameWithExtension}`);
|
|
24
|
+
traceGlobal(() => `\tModuleName: ${program.moduleName}`);
|
|
25
|
+
traceGlobal(() => `\tModulePrefix: ${program.modulePrefix}`);
|
|
26
|
+
traceGlobal(() => `\tRelativeFilePath: ${program.relativeFilePath}`);
|
|
27
|
+
traceGlobal(() => `\tResolvedFilePath: ${program.resolvedFilePath}`);
|
|
28
|
+
traceGlobal(() => `\tSourceFileFolder: ${program.sourceFileFolder}`);
|
|
29
|
+
traceGlobal(() => `\tSourceFilePath: ${program.sourceFilePath}`);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export function dumpProgramSrcFormatted(program: Program, recursive: boolean, withLines: boolean = true) {
|
|
33
|
-
const lines = program.ast.dumpSrc()
|
|
34
|
-
console.log(`// file: ${program.absoluteName}`)
|
|
33
|
+
const lines = program.ast.dumpSrc();
|
|
34
|
+
console.log(`// file: ${program.absoluteName}`);
|
|
35
35
|
if (withLines) {
|
|
36
|
-
console.log(
|
|
36
|
+
console.log(
|
|
37
|
+
lines
|
|
38
|
+
.split('\n')
|
|
39
|
+
.map((it, index) => `${`${index + 1}`.padStart(4)} |${it}`)
|
|
40
|
+
.join('\n')
|
|
41
|
+
);
|
|
37
42
|
} else {
|
|
38
|
-
console.log(lines)
|
|
43
|
+
console.log(lines);
|
|
39
44
|
}
|
|
40
45
|
}
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
Identifier,
|
|
21
21
|
ScriptFunction,
|
|
22
22
|
TSTypeParameterDeclaration,
|
|
23
|
-
TypeNode
|
|
24
|
-
} from
|
|
25
|
-
import { AstNode } from
|
|
26
|
-
import { Es2pandaModifierFlags, Es2pandaScriptFunctionFlags } from
|
|
27
|
-
import { isSameNativeObject } from
|
|
28
|
-
import { updateNodeByNode } from
|
|
29
|
-
import { KNativePointer } from
|
|
23
|
+
TypeNode,
|
|
24
|
+
} from '../../../generated';
|
|
25
|
+
import { AstNode } from '../peers/AstNode';
|
|
26
|
+
import { Es2pandaLanguage, Es2pandaModifierFlags, Es2pandaScriptFunctionFlags } from '../../../generated/Es2pandaEnums';
|
|
27
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
28
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
29
|
+
import { KNativePointer } from '@koalaui/interop';
|
|
30
30
|
|
|
31
31
|
export function createScriptFunction(
|
|
32
32
|
databody: AstNode | undefined,
|
|
@@ -39,28 +39,24 @@ export function createScriptFunction(
|
|
|
39
39
|
ident: Identifier | undefined,
|
|
40
40
|
annotations: readonly AnnotationUsage[] | undefined,
|
|
41
41
|
signaturePointer?: KNativePointer,
|
|
42
|
-
preferredReturnTypePointer?: KNativePointer
|
|
42
|
+
preferredReturnTypePointer?: KNativePointer
|
|
43
43
|
) {
|
|
44
|
-
const res = ScriptFunction.
|
|
44
|
+
const res = ScriptFunction.create1ScriptFunction(
|
|
45
45
|
databody,
|
|
46
|
-
FunctionSignature.createFunctionSignature(
|
|
47
|
-
typeParams,
|
|
48
|
-
params,
|
|
49
|
-
returnTypeAnnotation,
|
|
50
|
-
hasReceiver,
|
|
51
|
-
),
|
|
46
|
+
FunctionSignature.createFunctionSignature(typeParams, params, returnTypeAnnotation, hasReceiver),
|
|
52
47
|
datafuncFlags,
|
|
53
48
|
dataflags,
|
|
49
|
+
Es2pandaLanguage.LANGUAGE_ETS,
|
|
54
50
|
ident,
|
|
55
|
-
annotations
|
|
56
|
-
)
|
|
51
|
+
annotations
|
|
52
|
+
);
|
|
57
53
|
if (signaturePointer) {
|
|
58
|
-
res.setSignaturePointer(signaturePointer)
|
|
54
|
+
res.setSignaturePointer(signaturePointer);
|
|
59
55
|
}
|
|
60
56
|
if (preferredReturnTypePointer) {
|
|
61
|
-
res.setPreferredReturnTypePointer(preferredReturnTypePointer)
|
|
57
|
+
res.setPreferredReturnTypePointer(preferredReturnTypePointer);
|
|
62
58
|
}
|
|
63
|
-
return res
|
|
59
|
+
return res;
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
export function updateScriptFunction(
|
|
@@ -75,21 +71,22 @@ export function updateScriptFunction(
|
|
|
75
71
|
ident: Identifier | undefined,
|
|
76
72
|
annotations: readonly AnnotationUsage[] | undefined,
|
|
77
73
|
signaturePointer?: KNativePointer,
|
|
78
|
-
preferredReturnTypePointer?: KNativePointer
|
|
74
|
+
preferredReturnTypePointer?: KNativePointer
|
|
79
75
|
) {
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
76
|
+
if (
|
|
77
|
+
isSameNativeObject(databody, original.body) &&
|
|
78
|
+
isSameNativeObject(typeParams, original.typeParams) &&
|
|
79
|
+
isSameNativeObject(params, original.params) &&
|
|
80
|
+
isSameNativeObject(returnTypeAnnotation, original.returnTypeAnnotation) &&
|
|
81
|
+
isSameNativeObject(hasReceiver, original.hasReceiver) &&
|
|
82
|
+
isSameNativeObject(datafuncFlags, original.flags) &&
|
|
83
|
+
isSameNativeObject(dataflags, original.modifierFlags) &&
|
|
84
|
+
isSameNativeObject(ident, original.id) &&
|
|
85
|
+
isSameNativeObject(annotations, original.annotations) &&
|
|
86
|
+
signaturePointer === original.getSignaturePointer() &&
|
|
87
|
+
preferredReturnTypePointer === original.getPreferredReturnTypePointer()
|
|
91
88
|
) {
|
|
92
|
-
return original
|
|
89
|
+
return original;
|
|
93
90
|
}
|
|
94
91
|
return updateNodeByNode(
|
|
95
92
|
createScriptFunction(
|
|
@@ -103,10 +100,10 @@ export function updateScriptFunction(
|
|
|
103
100
|
ident,
|
|
104
101
|
annotations,
|
|
105
102
|
signaturePointer,
|
|
106
|
-
preferredReturnTypePointer
|
|
103
|
+
preferredReturnTypePointer
|
|
107
104
|
),
|
|
108
105
|
original
|
|
109
|
-
)
|
|
106
|
+
);
|
|
110
107
|
}
|
|
111
108
|
|
|
112
109
|
export function inplaceUpdateScriptFunction(
|
|
@@ -121,13 +118,14 @@ export function inplaceUpdateScriptFunction(
|
|
|
121
118
|
ident: Identifier | undefined,
|
|
122
119
|
annotations: readonly AnnotationUsage[] | undefined,
|
|
123
120
|
signaturePointer?: KNativePointer,
|
|
124
|
-
preferredReturnTypePointer?: KNativePointer
|
|
121
|
+
preferredReturnTypePointer?: KNativePointer
|
|
125
122
|
) {
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
if (
|
|
124
|
+
!isSameNativeObject(hasReceiver, original.hasReceiver) ||
|
|
125
|
+
!isSameNativeObject(datafuncFlags, original.flags)
|
|
126
|
+
) {
|
|
129
127
|
// unlikely
|
|
130
|
-
console.log(`Did not managed to update script function ${ident?.name} inplace!`)
|
|
128
|
+
console.log(`Did not managed to update script function ${ident?.name} inplace!`);
|
|
131
129
|
const result = createScriptFunction(
|
|
132
130
|
databody,
|
|
133
131
|
typeParams,
|
|
@@ -139,18 +137,19 @@ export function inplaceUpdateScriptFunction(
|
|
|
139
137
|
ident,
|
|
140
138
|
annotations,
|
|
141
139
|
signaturePointer,
|
|
142
|
-
preferredReturnTypePointer
|
|
143
|
-
)
|
|
144
|
-
result.onUpdate(original)
|
|
145
|
-
return result
|
|
140
|
+
preferredReturnTypePointer
|
|
141
|
+
);
|
|
142
|
+
result.onUpdate(original);
|
|
143
|
+
return result;
|
|
146
144
|
}
|
|
147
|
-
original.setBody(databody)
|
|
148
|
-
original.setParams(params)
|
|
149
|
-
original.
|
|
150
|
-
original.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if (
|
|
154
|
-
if (
|
|
155
|
-
|
|
145
|
+
original.setBody(databody);
|
|
146
|
+
original.setParams(params);
|
|
147
|
+
original.setTypeParams(typeParams);
|
|
148
|
+
original.setReturnTypeAnnotation(returnTypeAnnotation);
|
|
149
|
+
original.modifierFlags = dataflags;
|
|
150
|
+
original.setIdent(ident);
|
|
151
|
+
if (annotations) original.setAnnotations(annotations);
|
|
152
|
+
if (signaturePointer) original.setSignaturePointer(signaturePointer);
|
|
153
|
+
if (preferredReturnTypePointer) original.setPreferredReturnTypePointer(preferredReturnTypePointer);
|
|
154
|
+
return original;
|
|
156
155
|
}
|
|
@@ -13,15 +13,11 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
} from
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
} from "../../generated/Es2pandaEnums"
|
|
22
|
-
import { isSameNativeObject } from "../peers/ArktsObject"
|
|
23
|
-
import { updateNodeByNode } from "../utilities/private"
|
|
24
|
-
import { AstNode } from "../peers/AstNode"
|
|
16
|
+
import { TSInterfaceDeclaration, TSInterfaceHeritage } from '../../../generated';
|
|
17
|
+
import { Es2pandaLanguage, Es2pandaModifierFlags } from '../../../generated/Es2pandaEnums';
|
|
18
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
19
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
20
|
+
import { AstNode } from '../peers/AstNode';
|
|
25
21
|
|
|
26
22
|
export function createTSInterfaceDeclaration(
|
|
27
23
|
_extends: readonly TSInterfaceHeritage[],
|
|
@@ -30,17 +26,18 @@ export function createTSInterfaceDeclaration(
|
|
|
30
26
|
body: AstNode | undefined,
|
|
31
27
|
isStatic: boolean,
|
|
32
28
|
isExternal: boolean,
|
|
33
|
-
modifierFlags?: Es2pandaModifierFlags
|
|
29
|
+
modifierFlags?: Es2pandaModifierFlags
|
|
34
30
|
): TSInterfaceDeclaration {
|
|
35
|
-
return TSInterfaceDeclaration.
|
|
31
|
+
return TSInterfaceDeclaration.create1TSInterfaceDeclaration(
|
|
36
32
|
_extends,
|
|
37
33
|
id,
|
|
38
34
|
typeParams,
|
|
39
35
|
body,
|
|
40
36
|
isStatic,
|
|
41
37
|
isExternal,
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
Es2pandaLanguage.LANGUAGE_ETS,
|
|
39
|
+
modifierFlags
|
|
40
|
+
);
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
export function updateTSInterfaceDeclaration(
|
|
@@ -51,28 +48,21 @@ export function updateTSInterfaceDeclaration(
|
|
|
51
48
|
body: AstNode | undefined,
|
|
52
49
|
isStatic: boolean,
|
|
53
50
|
isExternal: boolean,
|
|
54
|
-
modifierFlags?: Es2pandaModifierFlags
|
|
51
|
+
modifierFlags?: Es2pandaModifierFlags
|
|
55
52
|
): TSInterfaceDeclaration {
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
if (
|
|
54
|
+
isSameNativeObject(_extends, original.extends) &&
|
|
55
|
+
isSameNativeObject(id, original.id) &&
|
|
56
|
+
isSameNativeObject(typeParams, original.typeParams) &&
|
|
57
|
+
isSameNativeObject(body, original.body) &&
|
|
58
|
+
isSameNativeObject(isStatic, original.isStatic) &&
|
|
59
|
+
isSameNativeObject(isExternal, original.isFromExternal) &&
|
|
60
|
+
isSameNativeObject(modifierFlags, original.modifierFlags)
|
|
63
61
|
) {
|
|
64
|
-
return original
|
|
62
|
+
return original;
|
|
65
63
|
}
|
|
66
64
|
return updateNodeByNode(
|
|
67
|
-
createTSInterfaceDeclaration(
|
|
68
|
-
_extends,
|
|
69
|
-
id,
|
|
70
|
-
typeParams,
|
|
71
|
-
body,
|
|
72
|
-
isStatic,
|
|
73
|
-
isExternal,
|
|
74
|
-
modifierFlags,
|
|
75
|
-
),
|
|
65
|
+
createTSInterfaceDeclaration(_extends, id, typeParams, body, isStatic, isExternal, modifierFlags),
|
|
76
66
|
original
|
|
77
|
-
)
|
|
67
|
+
);
|
|
78
68
|
}
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { Identifier, TSTypeParameter, TypeNode } from
|
|
17
|
-
import { Es2pandaModifierFlags } from
|
|
18
|
-
import { isSameNativeObject } from
|
|
19
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { Identifier, TSTypeParameter, TypeNode } from '../../../generated';
|
|
17
|
+
import { Es2pandaModifierFlags } from '../../../generated/Es2pandaEnums';
|
|
18
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
19
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
20
20
|
|
|
21
21
|
export function updateTSTypeParameter(
|
|
22
22
|
original: TSTypeParameter,
|
|
@@ -25,15 +25,13 @@ export function updateTSTypeParameter(
|
|
|
25
25
|
defaultType: TypeNode | undefined,
|
|
26
26
|
flags: Es2pandaModifierFlags
|
|
27
27
|
): TSTypeParameter {
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
if (
|
|
29
|
+
isSameNativeObject(name, original.name) &&
|
|
30
|
+
isSameNativeObject(constraint, original.constraint) &&
|
|
31
|
+
isSameNativeObject(defaultType, original.defaultType) &&
|
|
32
|
+
isSameNativeObject(flags, original.modifierFlags)
|
|
32
33
|
) {
|
|
33
|
-
return original
|
|
34
|
+
return original;
|
|
34
35
|
}
|
|
35
|
-
return updateNodeByNode(
|
|
36
|
-
|
|
37
|
-
original
|
|
38
|
-
)
|
|
39
|
-
}
|
|
36
|
+
return updateNodeByNode(TSTypeParameter.create1TSTypeParameter(name, constraint, defaultType, flags), original);
|
|
37
|
+
}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { ETSTypeReferencePart, Expression, TSTypeParameterInstantiation } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { ETSTypeReferencePart, Expression, TSTypeParameterInstantiation } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
19
|
|
|
20
20
|
export function updateETSTypeReferencePart(
|
|
21
21
|
original: ETSTypeReferencePart,
|
|
@@ -23,14 +23,12 @@ export function updateETSTypeReferencePart(
|
|
|
23
23
|
typeParams?: TSTypeParameterInstantiation,
|
|
24
24
|
prev?: ETSTypeReferencePart
|
|
25
25
|
): ETSTypeReferencePart {
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
if (
|
|
27
|
+
isSameNativeObject(name, original.name) &&
|
|
28
|
+
isSameNativeObject(typeParams, original.typeParams) &&
|
|
29
|
+
isSameNativeObject(prev, original.previous)
|
|
29
30
|
) {
|
|
30
|
-
return original
|
|
31
|
+
return original;
|
|
31
32
|
}
|
|
32
|
-
return updateNodeByNode(
|
|
33
|
-
|
|
34
|
-
original
|
|
35
|
-
)
|
|
36
|
-
}
|
|
33
|
+
return updateNodeByNode(ETSTypeReferencePart.createETSTypeReferencePart(name, typeParams, prev), original);
|
|
34
|
+
}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { BlockStatement, CatchClause, LabelPair, Statement, TryStatement } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { BlockStatement, CatchClause, LabelPair, Statement, TryStatement } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
19
|
|
|
20
20
|
export function updateTryStatement(
|
|
21
21
|
original: TryStatement,
|
|
@@ -25,11 +25,12 @@ export function updateTryStatement(
|
|
|
25
25
|
finalizerInsertionsLabelPair: readonly LabelPair[],
|
|
26
26
|
finalizerInsertionsStatement: readonly Statement[]
|
|
27
27
|
): TryStatement {
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
if (
|
|
29
|
+
isSameNativeObject(block, original.block) &&
|
|
30
|
+
isSameNativeObject(catchClauses, original.catchClauses) &&
|
|
31
|
+
isSameNativeObject(finalizer, original.finallyBlock)
|
|
31
32
|
) {
|
|
32
|
-
return original
|
|
33
|
+
return original;
|
|
33
34
|
}
|
|
34
35
|
return updateNodeByNode(
|
|
35
36
|
TryStatement.createTryStatement(
|
|
@@ -37,8 +38,8 @@ export function updateTryStatement(
|
|
|
37
38
|
catchClauses,
|
|
38
39
|
finalizer,
|
|
39
40
|
finalizerInsertionsLabelPair,
|
|
40
|
-
finalizerInsertionsStatement
|
|
41
|
+
finalizerInsertionsStatement
|
|
41
42
|
),
|
|
42
43
|
original
|
|
43
|
-
)
|
|
44
|
+
);
|
|
44
45
|
}
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { Expression, VariableDeclarator } from
|
|
17
|
-
import { Es2pandaVariableDeclaratorFlag } from
|
|
18
|
-
import { isSameNativeObject } from
|
|
19
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { Expression, VariableDeclarator } from '../../../generated';
|
|
17
|
+
import { Es2pandaVariableDeclaratorFlag } from '../../../generated/Es2pandaEnums';
|
|
18
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
19
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
20
20
|
|
|
21
21
|
export function updateVariableDeclarator(
|
|
22
22
|
original: VariableDeclarator,
|
|
@@ -24,14 +24,12 @@ export function updateVariableDeclarator(
|
|
|
24
24
|
ident?: Expression,
|
|
25
25
|
init?: Expression
|
|
26
26
|
): VariableDeclarator {
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
if (
|
|
28
|
+
isSameNativeObject(flag, original.flag) &&
|
|
29
|
+
isSameNativeObject(ident, original.id) &&
|
|
30
|
+
isSameNativeObject(init, original.init)
|
|
30
31
|
) {
|
|
31
|
-
return original
|
|
32
|
+
return original;
|
|
32
33
|
}
|
|
33
|
-
return updateNodeByNode(
|
|
34
|
-
VariableDeclarator.create1VariableDeclarator(flag, ident, init),
|
|
35
|
-
original
|
|
36
|
-
)
|
|
34
|
+
return updateNodeByNode(VariableDeclarator.create1VariableDeclarator(flag, ident, init), original);
|
|
37
35
|
}
|