@idlizer/arktscgen 2.1.10-arktscgen-2 → 2.1.10-arktscgen-3a
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 +89 -6
- package/build/libarkts-copy/native/meson.build +1 -0
- package/build/libarkts-copy/native/src/bridges.cc +10 -4
- package/build/libarkts-copy/native/src/common.cc +0 -12
- package/build/libarkts-copy/native/src/generated/bridges.cc +416 -723
- package/build/libarkts-copy/native/src/memoryTracker.cc +178 -0
- package/build/libarkts-copy/native/src/memoryTracker.h +52 -0
- package/build/libarkts-copy/package.json +8 -8
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +14 -2
- package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +2 -2
- package/build/libarkts-copy/src/arkts-api/index.ts +2 -1
- package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +4 -1
- package/{templates/node-map.ts → build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts} +8 -19
- package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +26 -9
- package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +309 -0
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +7 -21
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +61 -7
- package/build/libarkts-copy/src/arkts-api/visitor.ts +21 -14
- package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +1 -0
- package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +88 -172
- package/build/libarkts-copy/src/generated/factory.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +11 -13
- package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +3 -1
- package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -5
- package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +12 -14
- package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/CallExpression.ts +6 -2
- package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +1 -24
- package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +26 -20
- package/build/libarkts-copy/src/generated/peers/ClassElement.ts +2 -30
- package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +10 -12
- package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +9 -3
- package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSModule.ts +12 -14
- package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +13 -15
- package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +3 -4
- package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +10 -16
- package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +2 -2
- package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -10
- package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +5 -6
- package/build/libarkts-copy/src/generated/peers/NamedType.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -5
- package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Program.ts +9 -2
- package/build/libarkts-copy/src/generated/peers/Property.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +22 -19
- package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +2 -1
- package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -5
- package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +2 -25
- package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSImportType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSInferType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +14 -38
- package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +26 -40
- package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +11 -13
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +2 -3
- package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TryStatement.ts +1 -2
- package/build/libarkts-copy/src/generated/peers/TypeNode.ts +10 -12
- package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +11 -20
- package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -1
- package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -1
- package/build/libarkts-copy/src/index.ts +2 -1
- package/build/libarkts-copy/src/plugin-utils.ts +0 -10
- package/build/libarkts-copy/src/reexport-for-generated.ts +1 -20
- package/lib/index.js +115 -38
- package/package.json +4 -3
- package/templates/factory.ts +0 -1
- package/templates/peer.ts +0 -1
- package/build/libarkts-copy/src/arkts-api/ChainExpressionFilter.ts +0 -79
|
@@ -87,7 +87,25 @@
|
|
|
87
87
|
interface: "es2panda_Impl",
|
|
88
88
|
methods: [
|
|
89
89
|
"LogSyntaxError", "LogWarning", "LogTypeError", // wrong idl
|
|
90
|
-
"DestroyContext", // cleanup arena (Improve: move this cleanup to another method)
|
|
90
|
+
"DestroyContext", // cleanup arena (Improve: move this cleanup to another method)
|
|
91
|
+
|
|
92
|
+
// Handwritten bridges
|
|
93
|
+
"AstNodeRebind",
|
|
94
|
+
"ConfigGetOptions",
|
|
95
|
+
"CreateCacheContextFromFile",
|
|
96
|
+
"CreateContextFromFile",
|
|
97
|
+
"CreateContextFromString",
|
|
98
|
+
"CreateContextGenerateAbcForExternalSourceFiles",
|
|
99
|
+
"CreateDiagnosticInfo",
|
|
100
|
+
"CreateDiagnosticKind",
|
|
101
|
+
"CreateGlobalContext",
|
|
102
|
+
"CreateSuggestionInfo",
|
|
103
|
+
"DestroyGlobalContext",
|
|
104
|
+
"SourcePositionCol",
|
|
105
|
+
"ExternalSourceName",
|
|
106
|
+
"ExternalSourcePrograms",
|
|
107
|
+
"GenerateTsDeclarationsFromContext",
|
|
108
|
+
"LogDiagnostic",
|
|
91
109
|
],
|
|
92
110
|
},
|
|
93
111
|
{
|
|
@@ -96,6 +114,46 @@
|
|
|
96
114
|
"GetOverloadInfo", // return type is wrong
|
|
97
115
|
]
|
|
98
116
|
},
|
|
117
|
+
{
|
|
118
|
+
interface: "Decl", // handwritten bridge
|
|
119
|
+
methods: [
|
|
120
|
+
"Node"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
interface: "ETSParser", // handwritten bridge
|
|
125
|
+
methods: [
|
|
126
|
+
"BuildImportDeclaration",
|
|
127
|
+
"CreateExpression",
|
|
128
|
+
"GetGlobalProgramAbsName",
|
|
129
|
+
"GetImportPathManager",
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
interface: "Program", // handwritten bridge
|
|
134
|
+
methods: [
|
|
135
|
+
"DirectExternalSources",
|
|
136
|
+
"ExternalSources",
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
interface: "Scope", // handwritten bridge
|
|
141
|
+
methods: [
|
|
142
|
+
"SetParent",
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
interface: "Signature", // handwritten bridge
|
|
147
|
+
methods: [
|
|
148
|
+
"Function",
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
interface: "TSInterfaceBody", // handwritten bridge
|
|
153
|
+
methods: [
|
|
154
|
+
"BodyPtr",
|
|
155
|
+
]
|
|
156
|
+
},
|
|
99
157
|
{
|
|
100
158
|
interface: "AnnotationDeclaration",
|
|
101
159
|
methods: [
|
|
@@ -192,10 +250,14 @@
|
|
|
192
250
|
{
|
|
193
251
|
name: "ArrowFunctionExpression",
|
|
194
252
|
methods: [
|
|
253
|
+
{
|
|
254
|
+
name: "Function",
|
|
255
|
+
types: ["returnType"]
|
|
256
|
+
},
|
|
195
257
|
{
|
|
196
258
|
name: "FunctionConst",
|
|
197
259
|
types: ["returnType"]
|
|
198
|
-
}
|
|
260
|
+
},
|
|
199
261
|
]
|
|
200
262
|
},
|
|
201
263
|
{
|
|
@@ -281,6 +343,10 @@
|
|
|
281
343
|
{
|
|
282
344
|
name: "MethodDefinition",
|
|
283
345
|
methods: [
|
|
346
|
+
{
|
|
347
|
+
name: "Function",
|
|
348
|
+
types: ["returnType"]
|
|
349
|
+
},
|
|
284
350
|
{
|
|
285
351
|
name: "FunctionConst",
|
|
286
352
|
types: ["returnType"]
|
|
@@ -358,6 +424,10 @@
|
|
|
358
424
|
name: "setSignaturePointer",
|
|
359
425
|
definition: "extension_ScriptFunctionSetSignaturePointer",
|
|
360
426
|
},
|
|
427
|
+
{
|
|
428
|
+
name: "getParamsCasted",
|
|
429
|
+
definition: "extension_ScriptFunctionGetParamsCasted",
|
|
430
|
+
},
|
|
361
431
|
{
|
|
362
432
|
name: "getPreferredReturnTypePointer",
|
|
363
433
|
definition: "extension_ScriptFunctionGetPreferredReturnTypePointer",
|
|
@@ -366,10 +436,6 @@
|
|
|
366
436
|
name: "setPreferredReturnTypePointer",
|
|
367
437
|
definition: "extension_ScriptFunctionSetPreferredReturnTypePointer",
|
|
368
438
|
},
|
|
369
|
-
{
|
|
370
|
-
name: "setParams",
|
|
371
|
-
definition: "extension_ScriptFunctionSetParams",
|
|
372
|
-
},
|
|
373
439
|
]
|
|
374
440
|
},
|
|
375
441
|
{
|
|
@@ -397,6 +463,10 @@
|
|
|
397
463
|
{
|
|
398
464
|
interface: "Program",
|
|
399
465
|
methods: [
|
|
466
|
+
{
|
|
467
|
+
name: "getAstCasted",
|
|
468
|
+
definition: "extension_ProgramGetAstCasted",
|
|
469
|
+
},
|
|
400
470
|
{
|
|
401
471
|
name: "getExternalSources",
|
|
402
472
|
definition: "extension_ProgramGetExternalSources",
|
|
@@ -414,6 +484,10 @@
|
|
|
414
484
|
name: "getCol",
|
|
415
485
|
definition: "extension_SourcePositionGetCol",
|
|
416
486
|
},
|
|
487
|
+
{
|
|
488
|
+
name: "getIndex",
|
|
489
|
+
definition: "extension_SourcePositionGetIndex",
|
|
490
|
+
},
|
|
417
491
|
{
|
|
418
492
|
name: "toString",
|
|
419
493
|
definition: "extension_SourcePositionToString",
|
|
@@ -429,6 +503,15 @@
|
|
|
429
503
|
},
|
|
430
504
|
],
|
|
431
505
|
},
|
|
506
|
+
{
|
|
507
|
+
interface: "ETSFunctionType",
|
|
508
|
+
methods: [
|
|
509
|
+
{
|
|
510
|
+
name: "getParamsCasted",
|
|
511
|
+
definition: "extension_ETSFunctionTypeGetParamsCasted",
|
|
512
|
+
},
|
|
513
|
+
],
|
|
514
|
+
},
|
|
432
515
|
],
|
|
433
516
|
parameters: [
|
|
434
517
|
{
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
#include <string>
|
|
20
20
|
#include <mutex>
|
|
21
21
|
|
|
22
|
+
/** XXX: If you add or remove methods that exist in C API,
|
|
23
|
+
* please change generator/options.json5 accordingly.
|
|
24
|
+
*/
|
|
25
|
+
|
|
22
26
|
KNativePointer impl_AstNodeRebind(KNativePointer contextPtr, KNativePointer nodePtr)
|
|
23
27
|
{
|
|
24
28
|
auto context = reinterpret_cast<es2panda_Context*>(contextPtr);
|
|
@@ -433,10 +437,11 @@ KOALA_INTEROP_5(CreateDiagnosticInfo, KNativePointer, KNativePointer, KNativePoi
|
|
|
433
437
|
KStringArray, KInt, KNativePointer)
|
|
434
438
|
|
|
435
439
|
KNativePointer impl_CreateSuggestionInfo(KNativePointer context, KNativePointer kind, KStringArray argsPtr,
|
|
436
|
-
KInt argc, KStringPtr& substitutionCode, KNativePointer range)
|
|
440
|
+
KInt argc, KStringPtr& substitutionCode, KStringPtr& title, KNativePointer range)
|
|
437
441
|
{
|
|
438
442
|
const auto _context = reinterpret_cast<es2panda_Context*>(context);
|
|
439
443
|
const auto _kind = reinterpret_cast<es2panda_DiagnosticKind *>(kind);
|
|
444
|
+
const auto _title = getStringCopy(title);
|
|
440
445
|
const auto _range = reinterpret_cast<es2panda_SourceRange *>(range);
|
|
441
446
|
const std::size_t headerLen = 4;
|
|
442
447
|
const char** _args = new const char*[argc];
|
|
@@ -449,9 +454,10 @@ KNativePointer impl_CreateSuggestionInfo(KNativePointer context, KNativePointer
|
|
|
449
454
|
position += strLen;
|
|
450
455
|
}
|
|
451
456
|
const auto _substitutionCode = getStringCopy(substitutionCode);
|
|
452
|
-
return GetImpl()->CreateSuggestionInfo(_context, _kind, _args, argc, _substitutionCode, _range);
|
|
457
|
+
return GetImpl()->CreateSuggestionInfo(_context, _kind, _args, argc, _substitutionCode, _title, _range);
|
|
453
458
|
}
|
|
454
|
-
|
|
459
|
+
KOALA_INTEROP_7(CreateSuggestionInfo, KNativePointer, KNativePointer, KNativePointer, KStringArray, KInt,
|
|
460
|
+
KStringPtr, KStringPtr, KNativePointer)
|
|
455
461
|
|
|
456
462
|
void impl_LogDiagnostic(KNativePointer context, KNativePointer kind, KStringArray argvPtr,
|
|
457
463
|
KInt argc, KNativePointer pos)
|
|
@@ -538,4 +544,4 @@ KNativePointer impl_CreateTypeNodeFromTsType(KNativePointer context, KNativePoin
|
|
|
538
544
|
auto _typeAnnotation = GetImpl()->CreateOpaqueTypeNode(_context, _nodeTsType);
|
|
539
545
|
return _typeAnnotation;
|
|
540
546
|
}
|
|
541
|
-
KOALA_INTEROP_2(CreateTypeNodeFromTsType, KNativePointer, KNativePointer, KNativePointer);
|
|
547
|
+
KOALA_INTEROP_2(CreateTypeNodeFromTsType, KNativePointer, KNativePointer, KNativePointer);
|
|
@@ -268,18 +268,6 @@ KInt impl_IdentifierIdentifierFlags(KNativePointer contextPtr, KNativePointer no
|
|
|
268
268
|
}
|
|
269
269
|
KOALA_INTEROP_2(IdentifierIdentifierFlags, KInt, KNativePointer, KNativePointer)
|
|
270
270
|
|
|
271
|
-
void impl_ScriptFunctionSetParams(KNativePointer context, KNativePointer receiver, KNativePointerArray paramsList, KUInt paramsListLength) {
|
|
272
|
-
const auto _context = reinterpret_cast<es2panda_Context*>(context);
|
|
273
|
-
const auto _receiver = reinterpret_cast<es2panda_AstNode*>(receiver);
|
|
274
|
-
const auto _paramsList = reinterpret_cast<es2panda_AstNode**>(paramsList);
|
|
275
|
-
const auto _paramsListLength = static_cast<KUInt>(paramsListLength);
|
|
276
|
-
GetImpl()->ScriptFunctionClearParams(_context, _receiver);
|
|
277
|
-
for (size_t i = 0; i < _paramsListLength; i++) {
|
|
278
|
-
GetImpl()->ScriptFunctionEmplaceParams(_context, _receiver, _paramsList[i]);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
KOALA_INTEROP_V4(ScriptFunctionSetParams, KNativePointer, KNativePointer, KNativePointerArray, KUInt)
|
|
282
|
-
|
|
283
271
|
void impl_ClassDefinitionSetBody(KNativePointer context, KNativePointer receiver, KNativePointerArray body, KUInt bodyLength) {
|
|
284
272
|
const auto _context = reinterpret_cast<es2panda_Context*>(context);
|
|
285
273
|
const auto _receiver = reinterpret_cast<es2panda_AstNode*>(receiver);
|