@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,10 +13,10 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { AssignmentExpression, Expression } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
19
|
-
import { Es2pandaAstNodeType, Es2pandaTokenType } from
|
|
16
|
+
import { AssignmentExpression, Expression } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
|
+
import { Es2pandaAstNodeType, Es2pandaTokenType } from '../../../generated/Es2pandaEnums';
|
|
20
20
|
|
|
21
21
|
export function createAssignmentExpression(
|
|
22
22
|
left: Expression | undefined,
|
|
@@ -27,8 +27,8 @@ export function createAssignmentExpression(
|
|
|
27
27
|
Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION,
|
|
28
28
|
left,
|
|
29
29
|
right,
|
|
30
|
-
assignmentOperator
|
|
31
|
-
)
|
|
30
|
+
assignmentOperator
|
|
31
|
+
);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export function updateAssignmentExpression(
|
|
@@ -37,14 +37,12 @@ export function updateAssignmentExpression(
|
|
|
37
37
|
right: Expression | undefined,
|
|
38
38
|
assignmentOperator: Es2pandaTokenType
|
|
39
39
|
): AssignmentExpression {
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
if (
|
|
41
|
+
isSameNativeObject(left, original.left) &&
|
|
42
|
+
isSameNativeObject(right, original.right) &&
|
|
43
|
+
isSameNativeObject(assignmentOperator, original.operatorType)
|
|
43
44
|
) {
|
|
44
|
-
return original
|
|
45
|
+
return original;
|
|
45
46
|
}
|
|
46
|
-
return updateNodeByNode(
|
|
47
|
-
createAssignmentExpression(left, right, assignmentOperator),
|
|
48
|
-
original
|
|
49
|
-
)
|
|
47
|
+
return updateNodeByNode(createAssignmentExpression(left, right, assignmentOperator), original);
|
|
50
48
|
}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { BlockStatement, Statement } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { BlockStatement, Statement } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
19
|
|
|
20
20
|
export function updateBlockStatement(original: BlockStatement, statements: readonly Statement[]): BlockStatement {
|
|
21
21
|
if (isSameNativeObject(statements, original.statements)) {
|
|
22
|
-
return original
|
|
22
|
+
return original;
|
|
23
23
|
}
|
|
24
|
-
return updateNodeByNode(BlockStatement.createBlockStatement(statements), original)
|
|
24
|
+
return updateNodeByNode(BlockStatement.createBlockStatement(statements), original);
|
|
25
25
|
}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { BlockStatement, CallExpression, Expression, TSTypeParameterInstantiation } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { BlockStatement, CallExpression, Expression, TSTypeParameterInstantiation } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
19
|
|
|
20
20
|
export function updateCallExpression(
|
|
21
21
|
original: CallExpression,
|
|
@@ -24,21 +24,22 @@ export function updateCallExpression(
|
|
|
24
24
|
typeParams: TSTypeParameterInstantiation | undefined,
|
|
25
25
|
optional_arg: boolean = false,
|
|
26
26
|
trailingComma: boolean = false,
|
|
27
|
-
trailingBlock: BlockStatement | undefined = undefined
|
|
27
|
+
trailingBlock: BlockStatement | undefined = undefined
|
|
28
28
|
): CallExpression {
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
if (
|
|
30
|
+
isSameNativeObject(callee, original.callee) &&
|
|
31
|
+
isSameNativeObject(_arguments, original.arguments) &&
|
|
32
|
+
isSameNativeObject(typeParams, original.typeParams) &&
|
|
33
|
+
isSameNativeObject(optional_arg, original.isOptional) &&
|
|
34
|
+
isSameNativeObject(trailingComma, original.hasTrailingComma) &&
|
|
35
|
+
isSameNativeObject(trailingBlock, original.trailingBlock)
|
|
35
36
|
) {
|
|
36
|
-
return original
|
|
37
|
+
return original;
|
|
37
38
|
}
|
|
38
39
|
return updateNodeByNode(
|
|
39
40
|
CallExpression.createCallExpression(callee, _arguments, typeParams, optional_arg, trailingComma, trailingBlock),
|
|
40
41
|
original
|
|
41
|
-
)
|
|
42
|
+
);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
export function inplaceUpdateCallExpression(
|
|
@@ -48,13 +49,14 @@ export function inplaceUpdateCallExpression(
|
|
|
48
49
|
typeParams: TSTypeParameterInstantiation | undefined,
|
|
49
50
|
optional_arg: boolean = false,
|
|
50
51
|
trailingComma: boolean = false,
|
|
51
|
-
trailingBlock: BlockStatement | undefined = undefined
|
|
52
|
+
trailingBlock: BlockStatement | undefined = undefined
|
|
52
53
|
) {
|
|
53
|
-
if (
|
|
54
|
-
|
|
54
|
+
if (
|
|
55
|
+
!isSameNativeObject(optional_arg, original.isOptional) ||
|
|
56
|
+
!isSameNativeObject(trailingComma, original.hasTrailingComma)
|
|
55
57
|
) {
|
|
56
58
|
// unlikely
|
|
57
|
-
console.log(`Did not managed to update call expression ${callee?.dumpSrc()} inplace!`)
|
|
59
|
+
console.log(`Did not managed to update call expression ${callee?.dumpSrc()} inplace!`);
|
|
58
60
|
const result = CallExpression.createCallExpression(
|
|
59
61
|
callee,
|
|
60
62
|
_arguments,
|
|
@@ -62,13 +64,13 @@ export function inplaceUpdateCallExpression(
|
|
|
62
64
|
optional_arg,
|
|
63
65
|
trailingComma,
|
|
64
66
|
trailingBlock
|
|
65
|
-
)
|
|
66
|
-
result.onUpdate(original)
|
|
67
|
-
return result
|
|
67
|
+
);
|
|
68
|
+
result.onUpdate(original);
|
|
69
|
+
return result;
|
|
68
70
|
}
|
|
69
|
-
original.setCallee(callee)
|
|
70
|
-
original.setArguments(_arguments)
|
|
71
|
-
original.setTypeParams(typeParams)
|
|
72
|
-
original.setTrailingBlock(trailingBlock)
|
|
73
|
-
return original
|
|
71
|
+
original.setCallee(callee);
|
|
72
|
+
original.setArguments(_arguments);
|
|
73
|
+
original.setTypeParams(typeParams);
|
|
74
|
+
original.setTrailingBlock(trailingBlock);
|
|
75
|
+
return original;
|
|
74
76
|
}
|
|
@@ -21,12 +21,42 @@ import {
|
|
|
21
21
|
MethodDefinition,
|
|
22
22
|
TSClassImplements,
|
|
23
23
|
TSTypeParameterDeclaration,
|
|
24
|
-
TSTypeParameterInstantiation
|
|
25
|
-
} from
|
|
26
|
-
import { isSameNativeObject } from
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
|
|
24
|
+
TSTypeParameterInstantiation,
|
|
25
|
+
} from '../../../generated';
|
|
26
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
27
|
+
import { AstNode } from '../peers/AstNode';
|
|
28
|
+
import {
|
|
29
|
+
Es2pandaClassDefinitionModifiers,
|
|
30
|
+
Es2pandaLanguage,
|
|
31
|
+
Es2pandaModifierFlags,
|
|
32
|
+
} from '../../../generated/Es2pandaEnums';
|
|
33
|
+
|
|
34
|
+
export function createClassDefinition(
|
|
35
|
+
ident: Identifier | undefined,
|
|
36
|
+
typeParams: TSTypeParameterDeclaration | undefined,
|
|
37
|
+
superTypeParams: TSTypeParameterInstantiation | undefined,
|
|
38
|
+
_implements: readonly TSClassImplements[],
|
|
39
|
+
ctor: MethodDefinition | undefined,
|
|
40
|
+
superClass: Expression | undefined,
|
|
41
|
+
body: readonly AstNode[],
|
|
42
|
+
modifiers: Es2pandaClassDefinitionModifiers,
|
|
43
|
+
flags: Es2pandaModifierFlags,
|
|
44
|
+
annotations?: readonly AnnotationUsage[]
|
|
45
|
+
): ClassDefinition {
|
|
46
|
+
return ClassDefinition.create3ClassDefinition(
|
|
47
|
+
ident,
|
|
48
|
+
typeParams,
|
|
49
|
+
superTypeParams,
|
|
50
|
+
_implements,
|
|
51
|
+
ctor,
|
|
52
|
+
superClass,
|
|
53
|
+
body,
|
|
54
|
+
modifiers,
|
|
55
|
+
flags,
|
|
56
|
+
Es2pandaLanguage.LANGUAGE_ETS,
|
|
57
|
+
annotations
|
|
58
|
+
);
|
|
59
|
+
}
|
|
30
60
|
|
|
31
61
|
export function updateClassDefinition(
|
|
32
62
|
original: ClassDefinition,
|
|
@@ -41,32 +71,32 @@ export function updateClassDefinition(
|
|
|
41
71
|
flags: Es2pandaModifierFlags,
|
|
42
72
|
annotations?: readonly AnnotationUsage[]
|
|
43
73
|
): ClassDefinition {
|
|
44
|
-
if (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
74
|
+
if (
|
|
75
|
+
isSameNativeObject(ident, original.ident) &&
|
|
76
|
+
isSameNativeObject(typeParams, original.typeParams) &&
|
|
77
|
+
isSameNativeObject(superTypeParams, original.superTypeParams) &&
|
|
78
|
+
isSameNativeObject(_implements, original.implements) &&
|
|
79
|
+
isSameNativeObject(ctor, original.ctor) &&
|
|
80
|
+
isSameNativeObject(superClass, original.super) &&
|
|
81
|
+
isSameNativeObject(body, original.body) &&
|
|
82
|
+
isSameNativeObject(modifiers, original.modifiers) &&
|
|
83
|
+
isSameNativeObject(flags, original.modifierFlags) &&
|
|
84
|
+
isSameNativeObject(annotations, original.annotations)
|
|
54
85
|
) {
|
|
55
|
-
return original
|
|
86
|
+
return original;
|
|
56
87
|
}
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
)
|
|
88
|
+
return ClassDefinition.update3ClassDefinition(
|
|
89
|
+
original,
|
|
90
|
+
ident,
|
|
91
|
+
typeParams,
|
|
92
|
+
superTypeParams,
|
|
93
|
+
_implements,
|
|
94
|
+
ctor,
|
|
95
|
+
superClass,
|
|
96
|
+
body,
|
|
97
|
+
modifiers,
|
|
98
|
+
flags,
|
|
99
|
+
Es2pandaLanguage.LANGUAGE_ETS,
|
|
100
|
+
annotations
|
|
101
|
+
);
|
|
72
102
|
}
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { AnnotationUsage, ClassProperty, Expression, TypeNode } from
|
|
17
|
-
import { Es2pandaModifierFlags } from
|
|
18
|
-
import { isSameNativeObject } from
|
|
19
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { AnnotationUsage, ClassProperty, Expression, 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 updateClassProperty(
|
|
22
22
|
original: ClassProperty,
|
|
@@ -25,19 +25,20 @@ export function updateClassProperty(
|
|
|
25
25
|
typeAnnotation: TypeNode | undefined,
|
|
26
26
|
modifiers: Es2pandaModifierFlags,
|
|
27
27
|
isComputed: boolean,
|
|
28
|
-
annotations?: readonly AnnotationUsage[]
|
|
28
|
+
annotations?: readonly AnnotationUsage[]
|
|
29
29
|
): ClassProperty {
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
if (
|
|
31
|
+
isSameNativeObject(key, original.key) &&
|
|
32
|
+
isSameNativeObject(value, original.value) &&
|
|
33
|
+
isSameNativeObject(typeAnnotation, original.typeAnnotation) &&
|
|
34
|
+
isSameNativeObject(modifiers, original.modifierFlags) &&
|
|
35
|
+
isSameNativeObject(isComputed, original.isComputed) &&
|
|
36
|
+
isSameNativeObject(annotations, original.annotations)
|
|
36
37
|
) {
|
|
37
|
-
return original
|
|
38
|
+
return original;
|
|
38
39
|
}
|
|
39
40
|
return updateNodeByNode(
|
|
40
41
|
ClassProperty.createClassProperty(key, value, typeAnnotation, modifiers, isComputed, annotations),
|
|
41
42
|
original
|
|
42
|
-
)
|
|
43
|
+
);
|
|
43
44
|
}
|
|
@@ -13,10 +13,17 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
import {
|
|
17
|
+
AnnotationUsage,
|
|
18
|
+
ETSFunctionType,
|
|
19
|
+
Expression,
|
|
20
|
+
FunctionSignature,
|
|
21
|
+
TSTypeParameterDeclaration,
|
|
22
|
+
TypeNode,
|
|
23
|
+
} from '../../../generated';
|
|
24
|
+
import { Es2pandaScriptFunctionFlags } from '../../../generated/Es2pandaEnums';
|
|
25
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
26
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
20
27
|
|
|
21
28
|
export function createETSFunctionType(
|
|
22
29
|
typeParams: TSTypeParameterDeclaration | undefined,
|
|
@@ -24,18 +31,13 @@ export function createETSFunctionType(
|
|
|
24
31
|
returnTypeAnnotation: TypeNode | undefined,
|
|
25
32
|
hasReceiver: boolean,
|
|
26
33
|
funcFlags: Es2pandaScriptFunctionFlags,
|
|
27
|
-
annotations?: readonly AnnotationUsage[]
|
|
34
|
+
annotations?: readonly AnnotationUsage[]
|
|
28
35
|
): ETSFunctionType {
|
|
29
36
|
return ETSFunctionType.createETSFunctionType(
|
|
30
|
-
FunctionSignature.createFunctionSignature(
|
|
31
|
-
typeParams,
|
|
32
|
-
params,
|
|
33
|
-
returnTypeAnnotation,
|
|
34
|
-
hasReceiver,
|
|
35
|
-
),
|
|
37
|
+
FunctionSignature.createFunctionSignature(typeParams, params, returnTypeAnnotation, hasReceiver),
|
|
36
38
|
funcFlags,
|
|
37
|
-
annotations
|
|
38
|
-
)
|
|
39
|
+
annotations
|
|
40
|
+
);
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
export function updateETSFunctionType(
|
|
@@ -45,18 +47,19 @@ export function updateETSFunctionType(
|
|
|
45
47
|
returnTypeAnnotation: TypeNode | undefined,
|
|
46
48
|
hasReceiver: boolean,
|
|
47
49
|
funcFlags: Es2pandaScriptFunctionFlags,
|
|
48
|
-
annotations?: readonly AnnotationUsage[]
|
|
50
|
+
annotations?: readonly AnnotationUsage[]
|
|
49
51
|
): ETSFunctionType {
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
if (
|
|
53
|
+
isSameNativeObject(typeParams, original.typeParams) &&
|
|
54
|
+
isSameNativeObject(params, original.params) &&
|
|
55
|
+
isSameNativeObject(returnTypeAnnotation, original.returnType) &&
|
|
56
|
+
isSameNativeObject(funcFlags, original.flags) &&
|
|
57
|
+
isSameNativeObject(annotations, original.annotations)
|
|
55
58
|
) {
|
|
56
|
-
return original
|
|
59
|
+
return original;
|
|
57
60
|
}
|
|
58
61
|
return updateNodeByNode(
|
|
59
62
|
createETSFunctionType(typeParams, params, returnTypeAnnotation, hasReceiver, funcFlags, annotations),
|
|
60
63
|
original
|
|
61
|
-
)
|
|
64
|
+
);
|
|
62
65
|
}
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { ETSImportDeclaration, StringLiteral } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
19
|
-
import { AstNode } from
|
|
20
|
-
import { Es2pandaImportKinds } from
|
|
16
|
+
import { ETSImportDeclaration, StringLiteral } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
|
+
import { AstNode } from '../peers/AstNode';
|
|
20
|
+
import { Es2pandaImportKinds } from '../../../generated/Es2pandaEnums';
|
|
21
21
|
|
|
22
22
|
export function updateETSImportDeclaration(
|
|
23
23
|
original: ETSImportDeclaration,
|
|
@@ -25,15 +25,13 @@ export function updateETSImportDeclaration(
|
|
|
25
25
|
specifiers: readonly AstNode[],
|
|
26
26
|
importKind: Es2pandaImportKinds
|
|
27
27
|
): ETSImportDeclaration {
|
|
28
|
-
if (
|
|
29
|
-
|
|
28
|
+
if (
|
|
29
|
+
isSameNativeObject(source, original.source) &&
|
|
30
|
+
isSameNativeObject(specifiers, original.specifiers)
|
|
30
31
|
/* no getter for importKind */
|
|
31
32
|
) {
|
|
32
33
|
/* Improve: probably should set importMetadata, but no getter provided yet */
|
|
33
|
-
return original
|
|
34
|
+
return original;
|
|
34
35
|
}
|
|
35
|
-
return updateNodeByNode(
|
|
36
|
-
ETSImportDeclaration.createETSImportDeclaration(source, specifiers, importKind),
|
|
37
|
-
original
|
|
38
|
-
)
|
|
36
|
+
return updateNodeByNode(ETSImportDeclaration.createETSImportDeclaration(source, specifiers, importKind), original);
|
|
39
37
|
}
|
|
@@ -13,32 +13,28 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { ETSModule, Identifier, Program, Statement } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
19
|
-
import { Es2pandaModuleFlag } from
|
|
16
|
+
import { ETSModule, Identifier, Program, Statement } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
|
+
import { Es2pandaLanguage, Es2pandaModuleFlag } from '../../../generated/Es2pandaEnums';
|
|
20
20
|
|
|
21
21
|
export function updateETSModule(
|
|
22
22
|
original: ETSModule,
|
|
23
23
|
statementList: readonly Statement[],
|
|
24
24
|
ident: Identifier | undefined,
|
|
25
25
|
flag: Es2pandaModuleFlag,
|
|
26
|
-
program?: Program
|
|
26
|
+
program?: Program
|
|
27
27
|
) {
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
if (
|
|
29
|
+
isSameNativeObject(statementList, original.statements) &&
|
|
30
|
+
isSameNativeObject(ident, original.ident) &&
|
|
31
|
+
isSameNativeObject(flag, original.getNamespaceFlag()) &&
|
|
32
|
+
isSameNativeObject(program, original.program)
|
|
32
33
|
) {
|
|
33
|
-
return original
|
|
34
|
+
return original;
|
|
34
35
|
}
|
|
35
36
|
return updateNodeByNode(
|
|
36
|
-
ETSModule.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
flag,
|
|
40
|
-
program,
|
|
41
|
-
),
|
|
42
|
-
original,
|
|
43
|
-
)
|
|
37
|
+
ETSModule.create1ETSModule(statementList, ident, flag, Es2pandaLanguage.LANGUAGE_ETS, program),
|
|
38
|
+
original
|
|
39
|
+
);
|
|
44
40
|
}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { AnnotatedExpression, AnnotationUsage, ETSParameterExpression, Expression, TypeNode } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { AnnotatedExpression, AnnotationUsage, ETSParameterExpression, Expression, TypeNode } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
19
|
|
|
20
20
|
export function createETSParameterExpression(
|
|
21
21
|
identOrSpread: AnnotatedExpression | undefined,
|
|
@@ -23,11 +23,11 @@ export function createETSParameterExpression(
|
|
|
23
23
|
initExpr?: Expression,
|
|
24
24
|
annotations?: readonly AnnotationUsage[]
|
|
25
25
|
): ETSParameterExpression {
|
|
26
|
-
const res = ETSParameterExpression.createETSParameterExpression(identOrSpread, isOptional, annotations)
|
|
26
|
+
const res = ETSParameterExpression.createETSParameterExpression(identOrSpread, isOptional, annotations);
|
|
27
27
|
if (initExpr) {
|
|
28
|
-
res.setInitializer(initExpr)
|
|
28
|
+
res.setInitializer(initExpr);
|
|
29
29
|
}
|
|
30
|
-
return res
|
|
30
|
+
return res;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export function updateETSParameterExpression(
|
|
@@ -35,17 +35,16 @@ export function updateETSParameterExpression(
|
|
|
35
35
|
identOrSpread: AnnotatedExpression | undefined,
|
|
36
36
|
isOptional: boolean,
|
|
37
37
|
initExpr?: Expression,
|
|
38
|
-
annotations?: readonly AnnotationUsage[]
|
|
38
|
+
annotations?: readonly AnnotationUsage[]
|
|
39
39
|
): ETSParameterExpression {
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
if (
|
|
41
|
+
(isSameNativeObject(identOrSpread, original.ident) ||
|
|
42
|
+
isSameNativeObject(identOrSpread, original.restParameter)) &&
|
|
43
|
+
isSameNativeObject(isOptional, original.isOptional) &&
|
|
44
|
+
isSameNativeObject(initExpr, original.initializer) &&
|
|
45
|
+
isSameNativeObject(annotations, original.annotations)
|
|
44
46
|
) {
|
|
45
|
-
return original
|
|
47
|
+
return original;
|
|
46
48
|
}
|
|
47
|
-
return updateNodeByNode(
|
|
48
|
-
createETSParameterExpression(identOrSpread, isOptional, initExpr, annotations),
|
|
49
|
-
original
|
|
50
|
-
)
|
|
49
|
+
return updateNodeByNode(createETSParameterExpression(identOrSpread, isOptional, initExpr, annotations), original);
|
|
51
50
|
}
|
|
@@ -13,19 +13,16 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { ClassDefinition, ETSStructDeclaration } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { ClassDefinition, ETSStructDeclaration } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
19
|
|
|
20
20
|
export function updateETSStructDeclaration(
|
|
21
21
|
original: ETSStructDeclaration,
|
|
22
22
|
def?: ClassDefinition
|
|
23
23
|
): ETSStructDeclaration {
|
|
24
24
|
if (isSameNativeObject(def, original.definition)) {
|
|
25
|
-
return original
|
|
25
|
+
return original;
|
|
26
26
|
}
|
|
27
|
-
return updateNodeByNode(
|
|
28
|
-
ETSStructDeclaration.createETSStructDeclaration(def),
|
|
29
|
-
original
|
|
30
|
-
)
|
|
27
|
+
return updateNodeByNode(ETSStructDeclaration.createETSStructDeclaration(def), original);
|
|
31
28
|
}
|
|
@@ -13,19 +13,13 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { ETSTuple, TypeNode } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
16
|
+
import { ETSTuple, TypeNode } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
19
|
|
|
20
|
-
export function updateETSTuple(
|
|
21
|
-
original: ETSTuple,
|
|
22
|
-
typeList: readonly TypeNode[]
|
|
23
|
-
): ETSTuple {
|
|
20
|
+
export function updateETSTuple(original: ETSTuple, typeList: readonly TypeNode[]): ETSTuple {
|
|
24
21
|
if (isSameNativeObject(typeList, original.tupleTypeAnnotationsList)) {
|
|
25
|
-
return original
|
|
22
|
+
return original;
|
|
26
23
|
}
|
|
27
|
-
return updateNodeByNode(
|
|
28
|
-
ETSTuple.create2ETSTuple(typeList),
|
|
29
|
-
original
|
|
30
|
-
)
|
|
24
|
+
return updateNodeByNode(ETSTuple.create2ETSTuple(typeList), original);
|
|
31
25
|
}
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { Expression, MemberExpression } from
|
|
17
|
-
import { isSameNativeObject } from
|
|
18
|
-
import { updateNodeByNode } from
|
|
19
|
-
import { Es2pandaMemberExpressionKind } from
|
|
16
|
+
import { Expression, MemberExpression } from '../../../generated';
|
|
17
|
+
import { isSameNativeObject } from '../peers/ArktsObject';
|
|
18
|
+
import { updateNodeByNode } from '../utilities/private';
|
|
19
|
+
import { Es2pandaMemberExpressionKind } from '../../../generated/Es2pandaEnums';
|
|
20
20
|
|
|
21
21
|
export function updateMemberExpression(
|
|
22
22
|
original: MemberExpression,
|
|
@@ -26,16 +26,17 @@ export function updateMemberExpression(
|
|
|
26
26
|
computed: boolean,
|
|
27
27
|
optional_arg: boolean
|
|
28
28
|
): MemberExpression {
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
if (
|
|
30
|
+
isSameNativeObject(object_arg, original.object) &&
|
|
31
|
+
isSameNativeObject(property, original.property) &&
|
|
32
|
+
isSameNativeObject(kind, original.kind) &&
|
|
33
|
+
isSameNativeObject(computed, original.isComputed) &&
|
|
34
|
+
isSameNativeObject(optional_arg, original.isOptional)
|
|
34
35
|
) {
|
|
35
|
-
return original
|
|
36
|
+
return original;
|
|
36
37
|
}
|
|
37
38
|
return updateNodeByNode(
|
|
38
39
|
MemberExpression.createMemberExpression(object_arg, property, kind, computed, optional_arg),
|
|
39
40
|
original
|
|
40
|
-
)
|
|
41
|
+
);
|
|
41
42
|
}
|