• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import {
17    KNativePointer as KPtr,
18    KInt,
19    KBoolean,
20    KNativePointer,
21    registerNativeModuleLibraryName,
22    loadNativeModuleLibrary,
23    KDouble,
24} from '@koalaui/interop';
25import { Es2pandaNativeModule as GeneratedEs2pandaNativeModule } from './generated/Es2pandaNativeModule';
26import * as path from 'path';
27
28// TODO: this type should be in interop
29export type KPtrArray = BigUint64Array;
30
31export class Es2pandaNativeModule {
32    _ClassDefinitionSuper(context: KPtr, node: KPtr): KPtr {
33        throw new Error('Not implemented');
34    }
35    _CreateTSInterfaceDeclaration(
36        _context: KPtr,
37        _extends: KPtrArray,
38        _extendsLen: KInt,
39        _id: KPtr,
40        _typeParams: KPtr,
41        _body: KPtr,
42        _isStatic: KBoolean,
43        _isExternal: KBoolean
44    ): KPtr {
45        throw new Error('Not implemented');
46    }
47    _CreateTSTypeParameterInstantiation(context: KPtr, params: KPtrArray, paramsLen: KInt): KPtr {
48        throw new Error('Not implemented');
49    }
50    _ClassElementKey(context: KPtr, node: KPtr): KPtr {
51        throw new Error('Not implemented');
52    }
53    _ClassElementValue(context: KPtr, node: KPtr): KPtr {
54        throw new Error('Not implemented');
55    }
56    _AnnotationUsageIrExpr(context: KPtr, node: KPtr): KPtr {
57        throw new Error('Not implemented');
58    }
59    _AnnotationUsageIrPropertiesConst(context: KPtr, node: KPtr, returnLen: KPtr): KPtr {
60        throw new Error('Not implemented');
61    }
62    _AnnotationAllowedAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr {
63        throw new Error('Not implemented');
64    }
65    _AnnotationAllowedAnnotationsConst(context: KPtr, node: KPtr, returnLen: KPtr): KPtr {
66        throw new Error('Not implemented');
67    }
68    _AstNodeRebind(context: KPtr, node: KPtr): void {
69        throw new Error('Not implemented');
70    }
71    _AstNodeRecheck(context: KPtr, node: KPtr): void {
72        throw new Error('Not implemented');
73    }
74
75    _ContextState(context: KPtr): KInt {
76        throw new Error('Not implemented');
77    }
78    _ContextErrorMessage(context: KPtr): KPtr {
79        throw new Error('Not implemented');
80    }
81    _GetAllErrorMessages(context: KPtr): KPtr {
82        throw new Error('Not implemented');
83    }
84    _AstNodeChildren(context: KPtr, node: KPtr): KPtr {
85        throw new Error('Not implemented');
86    }
87    _ETSParserCreateExpression(context: KPtr, sourceCode: String, flags: KInt): KPtr {
88        throw new Error('Not implemented');
89    }
90    _AstNodeDumpModifiers(context: KPtr, node: KPtr): KPtr {
91        throw new Error('Not implemented');
92    }
93    _CreateAstDumper(context: KPtr, node: KPtr, source: String): KPtr {
94        throw new Error('Not implemented');
95    }
96    _AstDumperModifierToString(context: KPtr, dumper: KPtr, flags: KInt): KPtr {
97        throw new Error('Not implemented');
98    }
99
100    _CreateConfig(argc: number, argv: string[]): KPtr {
101        throw new Error('Not implemented');
102    }
103    _DestroyConfig(config: KPtr): void {
104        throw new Error('Not implemented');
105    }
106    _CreateContextFromString(config: KPtr, source: String, filename: String): KPtr {
107        throw new Error('Not implemented');
108    }
109    _CreateContextGenerateAbcForExternalSourceFiles(config: KPtr, fileCount: KInt, filenames:
110        string[]): KPtr {
111        throw new Error('Not implemented');
112    }
113    _CreateContextFromFile(config: KPtr, filename: String): KPtr {
114        throw new Error('Not implemented');
115    }
116    _DestroyContext(context: KPtr): void {
117        throw new Error('Not implemented');
118    }
119    _ProceedToState(context: KPtr, state: number): void {
120        throw new Error('Not implemented');
121    }
122    _ContextProgram(context: KPtr): KPtr {
123        throw new Error('Not implemented');
124    }
125    _ProgramAst(context: KPtr, program: KPtr): KPtr {
126        throw new Error('Not implemented');
127    }
128    _CheckerStartChecker(context: KPtr): KBoolean {
129        throw new Error('Not implemented');
130    }
131    _VarBinderIdentifierAnalysis(context: KPtr): void {
132        throw new Error('Not implemented');
133    }
134    _VarBinderInitTopScope(context: KPtr): void {
135        throw new Error('Not implemented');
136    }
137    _VarBinderSetGenStdLib(context: KPtr, genStdLibT: KBoolean): void {
138        throw new Error('Not implemented');
139    }
140    _SourceFileGetChildren(node: KPtr): KPtr {
141        throw new Error('Not implemented');
142    }
143    _BlockGetStatements(node: KPtr): KPtr {
144        throw new Error('Not implemented');
145    }
146    _FunctionDeclarationIsAnonymousConst(context: KPtr, node: KPtr): KBoolean {
147        throw new Error('Not implemented');
148    }
149    _ExpressionStatementGetExpression(context: KPtr, node: KPtr): KPtr {
150        throw new Error('Not implemented');
151    }
152    _CallExpressionArguments(context: KPtr, node: KPtr, returnLen: KPtr): KPtr {
153        throw new Error('Not implemented');
154    }
155    _CallExpressionCallee(context: KPtr, node: KPtr): KPtr {
156        throw new Error('Not implemented');
157    }
158    _IdentifierGetText(node: KPtr): KPtr {
159        throw new Error('Not implemented');
160    }
161    _IdentifierIsPrivateIdentConst(context: KPtr, node: KPtr): KBoolean {
162        throw new Error('Not implemented');
163    }
164    _PropertyAccessExpressionGetExpression(node: KPtr): KPtr {
165        throw new Error('Not implemented');
166    }
167    _PropertyAccessExpressionGetName(node: KPtr): KPtr {
168        throw new Error('Not implemented');
169    }
170
171    _FunctionDeclarationFunction(context: KPtr, node: KPtr): KPtr {
172        throw new Error('Not implemented');
173    }
174    _ScriptFunctionSignature(context: KPtr, node: KPtr): KPtr {
175        throw new Error('Not implemented');
176    }
177    _ScriptFunctionParams(context: KPtr, node: KPtr): KPtr {
178        throw new Error('Not implemented');
179    }
180    _ScriptFunctionId(context: KPtr, node: KPtr): KPtr {
181        throw new Error('Not implemented');
182    }
183    _ScriptFunctionBody(context: KPtr, node: KPtr): KPtr {
184        throw new Error('Not implemented');
185    }
186    _ScriptFunctionAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr {
187        throw new Error('Not implemented');
188    }
189    _ScriptFunctionSetIdent(context: KPtr, ast: KPtr, id: KPtr): KPtr {
190        throw new Error('Not implemented');
191    }
192    _ScriptFunctionSetSignature(context: KPtr, ast: KPtr, signature: KPtr): KPtr {
193        throw new Error('Not implemented');
194    }
195    _ScriptFunctionSetBody(context: KPtr, ast: KPtr, body: KPtr): KPtr {
196        throw new Error('Not implemented');
197    }
198    _ScriptFunctionSetScope(context: KPtr, ast: KPtr, scope: KPtr): KPtr {
199        throw new Error('Not implemented');
200    }
201    _ScriptFunctionSetAnnotations(context: KPtr, ast: KPtr, annotations: KPtrArray, annotationsLen: KInt): KPtr {
202        throw new Error('Not implemented');
203    }
204    _ScriptFunctionDeclareConst(context: KPtr, node: KPtr): KBoolean {
205        throw new Error('Not implemented');
206    }
207    _ScriptFunctionFlagsConst(context: KPtr, node: KPtr): KInt {
208        throw new Error('Not implemented');
209    }
210    _ScriptFunctionTypeParams(context: KPtr, node: KPtr): KPtr {
211        throw new Error('Not implemented');
212    }
213    _ScriptFunctionReturnTypeAnnotation(context: KPtr, node: KPtr): KPtr {
214        throw new Error('Not implemented');
215    }
216    _ScriptFunctionAddFlag(context: KPtr, node: KPtr, flags: KInt): void {
217        throw new Error('Not implemented');
218    }
219    _ClassPropertyAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr {
220        throw new Error('Not implemented');
221    }
222    _ClassPropertySetAnnotations(context: KPtr, ast: KPtr, annotations: KPtrArray, annotationsLen: KInt): KPtr {
223        throw new Error('Not implemented');
224    }
225    _UpdateBlockStatement(context: KPtr, original: KPtr, statementList: KPtrArray, statementListLen: KInt): KPtr {
226        throw new Error('Not implemented');
227    }
228    _BlockStatementSetScope(context: KPtr, node: KPtr, scope: KPtrArray): void {
229        throw new Error('Not implemented');
230    }
231    _CreateIdentifier1(context: KPtr, name: String): KPtr {
232        throw new Error('Not implemented');
233    }
234    _CreateIdentifier2(context: KPtr, name: String, type_annotation: KPtr): KPtr {
235        throw new Error('Not implemented');
236    }
237    _IdentifierSetName(context: KPtr, node: KPtr, name: String): void {
238        throw new Error('Not implemented');
239    }
240    _IdentifierIdentifierFlags(context: KPtr, node: KPtr): KInt {
241        throw new Error('Not implemented');
242    }
243    _CreateFunctionDeclaration(
244        context: KPtr,
245        func: KPtr,
246        annotations: KPtrArray,
247        annotationsLen: KInt,
248        isAnon: KBoolean
249    ): KPtr {
250        throw new Error('Not implemented');
251    }
252    _UpdateFunctionDeclaration(
253        context: KPtr,
254        node: KPtr,
255        annotations: KPtrArray,
256        annotationsLen: KInt,
257        func: KPtr,
258        isAnon: KBoolean
259    ): KPtr {
260        throw new Error('Not implemented');
261    }
262    _CreateReturnStatement1(context: KPtr, argument: KPtr): KPtr {
263        throw new Error('Not implemented');
264    }
265    _ReturnStatementArgument(context: KPtr, node: KPtr): KPtr {
266        throw new Error('Not implemented');
267    }
268    _CreateIfStatement(context: KPtr, test: KPtr, consequent: KPtr, alternate: KPtr): KPtr {
269        throw new Error('Not implemented');
270    }
271    _CreateBinaryExpression(context: KPtr, left: KPtr, right: KPtr, operatorType: KInt): KPtr {
272        throw new Error('Not implemented');
273    }
274    _CreateAssignmentExpression(context: KPtr, left: KPtr, right: KPtr, assignmentOperator: KInt): KPtr {
275        throw new Error('Not implemented');
276    }
277    _CreateMethodDefinition(
278        context: KPtr,
279        kind: KInt,
280        key: KPtr,
281        value: KPtr,
282        modifiers: KInt,
283        isComputed: KBoolean
284    ): KPtr {
285        throw new Error('Not implemented');
286    }
287    _CreateClassProperty(
288        context: KPtr,
289        key: KPtr,
290        value: KPtr,
291        typeAnnotation: KPtr,
292        modifiers: KInt,
293        isComputed: KBoolean
294    ): KPtr {
295        throw new Error('Not implemented');
296    }
297    _CreateETSImportDeclaration(
298        context: KNativePointer,
299        importPath: KNativePointer,
300        specifiers: BigUint64Array,
301        specifiersSequenceLength: KInt,
302        importKind: KInt,
303        programPtr: KNativePointer,
304        flags: KInt
305    ): KNativePointer {
306        throw new Error('Not implemented');
307    }
308    _ETSImportDeclarationSourceConst(context: KPtr, node: KPtr): KPtr {
309        throw new Error('Not implemented');
310    }
311    _ETSImportDeclarationResolvedSource(context: KPtr, node: KPtr): KPtr {
312        throw new Error('Not implemented');
313    }
314    _ETSImportDeclarationHasDeclConst(context: KPtr, node: KPtr): KBoolean {
315        throw new Error('Not implemented');
316    }
317    _CreateImportSource(context: KPtr, source: KPtr, resolvedSource: KPtr, hasDecl: KBoolean): KNativePointer {
318        throw new Error('Not implemented');
319    }
320    _CreateImportSpecifier(context: KPtr, imported: KPtr, local: KPtr): KNativePointer {
321        throw new Error('Not implemented');
322    }
323
324    _CreateFunctionSignature(
325        context: KPtr,
326        typeParams: KPtr,
327        params: KPtrArray,
328        paramsLen: KInt,
329        returnTypeAnnotation: KPtr,
330        hasReceiver: KBoolean
331    ): KPtr {
332        throw new Error('Not implemented');
333    }
334    _CreateScriptFunction(
335        context: KPtr,
336        databody: KPtr,
337        datasignature: KPtr,
338        datafuncFlags: KInt,
339        dataflags: KInt
340    ): KPtr {
341        throw new Error('Not implemented');
342    }
343    _UpdateScriptFunction(
344        context: KPtr,
345        original: KPtr,
346        databody: KPtr,
347        datasignature: KPtr,
348        datafuncFlags: KInt,
349        dataflags: KInt,
350        datadeclare: KBoolean
351    ): KPtr {
352        throw new Error('Not implemented');
353    }
354    _CreateBlockStatement(context: KPtr, statementList: KPtrArray, statementListLen: KInt): KPtr {
355        throw new Error('Not implemented');
356    }
357    _AstNodeScopeConst(context: KPtr, ast: KPtr): KPtr {
358        throw new Error('Not implemented');
359    }
360    _AstNodeParent(context: KPtr, ast: KPtr): KPtr {
361        throw new Error('Not implemented');
362    }
363    _AstNodeSetParent(context: KPtr, ast: KPtr, parent: KPtr): KPtr {
364        throw new Error('Not implemented');
365    }
366    _AstNodeClone(context: KPtr, ast: KPtr, parent: KPtr): KPtr {
367        throw new Error('Not implemented');
368    }
369    _AstNodeModifiers(context: KPtr, ast: KPtr): KInt {
370        throw new Error('Not implemented');
371    }
372    _AstNodeAddModifier(context: KPtr, ast: KPtr, flags: KInt): void {
373        throw new Error('Not implemented');
374    }
375    _AstNodeClearModifier(context: KPtr, ast: KPtr, flags: KInt): void {
376        throw new Error('Not implemented');
377    }
378    _AstNodeVariableConst(context: KPtr, ast: KPtr): KPtr {
379        throw new Error('Not implemented');
380    }
381    _AstNodeTypeConst(context: KPtr, ast: KPtr): KInt {
382        throw new Error('Not implemented');
383    }
384    _FunctionSignatureTypeParams(context: KPtr, ast: KPtr): KPtr {
385        throw new Error('Not implemented');
386    }
387    _FunctionSignatureReturnType(context: KPtr, ast: KPtr): KPtr {
388        throw new Error('Not implemented');
389    }
390    _FunctionSignatureParamsConst(context: KPtr, ast: KPtr, returnTypeLen: KPtr): KPtr {
391        throw new Error('Not implemented');
392    }
393    _UpdateIdentifier1(context: KPtr, ast: KPtr, name: string): KPtr {
394        throw new Error('Not implemented');
395    }
396    _UpdateIdentifier2(context: KPtr, ast: KPtr, name: string, typeAnnotation: KPtr): KPtr {
397        throw new Error('Not implemented');
398    }
399    _UpdateMethodDefinition(
400        context: KPtr,
401        node: KPtr,
402        kind: KInt,
403        key: KPtr,
404        value: KPtr,
405        modifiers: KInt,
406        isComputed: KBoolean
407    ): KPtr {
408        throw new Error('Not implemented');
409    }
410    _MethodDefinitionFunction(context: KPtr, node: KPtr): KPtr {
411        throw new Error('Not implemented');
412    }
413    _MethodDefinitionKindConst(context: KPtr, node: KPtr): KInt {
414        throw new Error('Not implemented');
415    }
416
417    _CreateMemberExpression(
418        context: KPtr,
419        object: KPtr,
420        property: KPtr,
421        kind: KInt,
422        computed: KBoolean,
423        optional: KBoolean
424    ): KPtr {
425        throw new Error('Not implemented');
426    }
427    _UpdateMemberExpression(
428        context: KPtr,
429        node: KPtr,
430        object: KPtr,
431        property: KPtr,
432        kind: KInt,
433        computed: KBoolean,
434        optional: KBoolean
435    ): KPtr {
436        throw new Error('Not implemented');
437    }
438    _MemberExpressionObject(context: KPtr, node: KPtr): KPtr {
439        throw new Error('Not implemented');
440    }
441    _MemberExpressionProperty(context: KPtr, node: KPtr): KPtr {
442        throw new Error('Not implemented');
443    }
444    _MemberExpressionKindConst(context: KPtr, node: KPtr): KInt {
445        throw new Error('Not implemented');
446    }
447    _CreateCallExpression(
448        context: KPtr,
449        callee: KPtr,
450        args: KPtrArray,
451        argsLen: KInt,
452        typeParams: KPtr,
453        optional: KBoolean,
454        trailingComma: KBoolean
455    ): KPtr {
456        throw new Error('Not implemented');
457    }
458    _UpdateCallExpression(
459        context: KPtr,
460        node: KPtr,
461        callee: KPtr,
462        args: KPtrArray,
463        argsLen: KInt,
464        typeParams: KPtr,
465        optional: KBoolean,
466        trailingComma: KBoolean
467    ): KPtr {
468        throw new Error('Not implemented');
469    }
470    _CreateArrowFunctionExpression(context: KPtr, node: KPtr): KPtr {
471        throw new Error('Not implemented');
472    }
473    _FunctionExpressionFunction(context: KPtr, node: KPtr): KPtr {
474        throw new Error('Not implemented');
475    }
476    _ArrowFunctionExpressionFunction(context: KPtr, node: KPtr): KPtr {
477        throw new Error('Not implemented');
478    }
479    _ArrowFunctionExpressionCreateTypeAnnotation(context: KPtr, node: KPtr): KPtr {
480        throw new Error('Not implemented');
481    }
482    _CreateFunctionExpression(context: KPtr, node: KPtr): KPtr {
483        throw new Error('Not implemented');
484    }
485    _UpdateFunctionExpression(context: KPtr, original: KPtr, node: KPtr): KPtr {
486        throw new Error('Not implemented');
487    }
488
489    _CreateExpressionStatement(context: KPtr, expr: KPtr): KPtr {
490        throw new Error('Not implemented');
491    }
492    _UpdateExpressionStatement(context: KPtr, node: KPtr, expr: KPtr): KPtr {
493        throw new Error('Not implemented');
494    }
495    _CreateETSParameterExpression(context: KPtr, identifier: KPtr, initializer: KPtr): KPtr {
496        throw new Error('Not implemented');
497    }
498    _CreateETSPrimitiveType(context: KPtr, type: KInt): KPtr {
499        throw new Error('Not implemented');
500    }
501    _ETSPrimitiveTypeGetPrimitiveTypeConst(context: KPtr, node: KNativePointer): KInt {
502        throw new Error('Not implemented');
503    }
504    _CreateETSTypeReference(context: KPtr, part: KPtr): KPtr {
505        throw new Error('Not implemented');
506    }
507    _CreateETSTypeReferencePart(context: KPtr, name: KPtr, typeParams: KPtr, prev: KPtr): KPtr {
508        throw new Error('Not implemented');
509    }
510    _CreateETSTypeReferencePart1(context: KPtr, name: KPtr): KPtr {
511        throw new Error('Not implemented');
512    }
513    _IsIdentifier(node: KPtr): KBoolean {
514        throw new Error('Not implemented');
515    }
516    _IdentifierName(context: KPtr, node: KPtr): KPtr {
517        throw new Error('Not implemented');
518    }
519    _ETSParameterExpressionIdent(context: KPtr, node: KPtr): KPtr {
520        throw new Error('Not implemented');
521    }
522    _ETSParameterExpressionAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr {
523        throw new Error('Not implemented');
524    }
525    _ETSParameterExpressionSetAnnotations(
526        context: KPtr,
527        ast: KPtr,
528        annotations: KPtrArray,
529        annotationsLen: KInt
530    ): KPtr {
531        throw new Error('Not implemented');
532    }
533    _CreateTSTypeParameterDeclaration(context: KPtr, params: KPtrArray, paramsLen: KInt, requiredParams: KInt): KPtr {
534        throw new Error('Not implemented');
535    }
536    _TSTypeParameterDeclarationParamsConst(context: KPtr, node: KPtr, returnTypeLen: KPtr): KPtr {
537        throw new Error('Not implemented');
538    }
539    _CreateTSTypeParameter(context: KPtr, name: KPtr, constraint: KPtr, defaultType: KPtr): KPtr {
540        throw new Error('Not implemented');
541    }
542    _TSTypeParameterName(context: KPtr, node: KPtr): KPtr {
543        throw new Error('Not implemented');
544    }
545
546    _CreateTSUnionType(context: KPtr, types: KPtrArray, typesLen: KInt): KPtr {
547        throw new Error('Not implemented');
548    }
549    _TSUnionTypeTypesConst(context: KPtr, node: KPtr, returnTypeLen: KPtr): KPtr {
550        throw new Error('Not implemented');
551    }
552    _CreateETSUnionTypeIr(context: KPtr, types: KPtrArray, typesLen: KInt): KPtr {
553        throw new Error('Not implemented');
554    }
555    _ETSUnionTypeIrTypesConst(context: KPtr, node: KPtr, returnTypeLen: KPtr): KPtr {
556        throw new Error('Not implemented');
557    }
558
559    _CreateVariableDeclaration(context: KPtr, kind: KInt, declarators: KPtrArray, declaratorsLen: KInt): KPtr {
560        throw new Error('Not implemented');
561    }
562    _UpdateVariableDeclaration(
563        context: KPtr,
564        original: KPtr,
565        kind: KInt,
566        declarators: KPtrArray,
567        declaratorsLen: KInt,
568        declare: KBoolean
569    ): KPtr {
570        throw new Error('Not implemented');
571    }
572    _CreateVariableDeclarator(context: KPtr, flag: KInt, ident: KPtr): KPtr {
573        throw new Error('Not implemented');
574    }
575    _VariableDeclarationDeclaratorsConst(context: KPtr, node: KPtr): KPtr {
576        throw new Error('Not implemented');
577    }
578    _VariableDeclarationKindConst(context: KPtr, node: KPtr): KInt {
579        throw new Error('Not implemented');
580    }
581    _VariableDeclaratorId(context: KPtr, node: KPtr): KPtr {
582        throw new Error('Not implemented');
583    }
584    _VariableDeclaratorSetInit(context: KPtr, node: KPtr, init: KPtr): void {
585        throw new Error('Not implemented');
586    }
587
588    _CreateStringLiteral(context: KPtr, string: string): KPtr {
589        throw new Error('Not implemented');
590    }
591    _CreateNumberLiteral(context: KPtr, value: KDouble): KPtr {
592        throw new Error('Not implemented');
593    }
594    _NumberLiteralStrConst(context: KPtr, node: KPtr): KPtr {
595        throw new Error('Not implemented');
596    }
597    _StringLiteralStrConst(context: KPtr, node: KPtr): KPtr {
598        throw new Error('Not implemented');
599    }
600
601    _BlockStatementStatements(context: KPtr, node: KPtr): KPtr {
602        throw new Error('Not implemented');
603    }
604    _BlockStatementSetStatements(context: KPtr, node: KPtr, statements: KPtrArray, statementsLen: KInt): void {
605        throw new Error('Not implemented');
606    }
607    _ClassDeclarationDefinition(context: KPtr, node: KPtr): KPtr {
608        throw new Error('Not implemented');
609    }
610    _ClassDefinitionBody(context: KPtr, node: KPtr): KPtr {
611        throw new Error('Not implemented');
612    }
613    _ClassDefinitionIdent(context: KPtr, node: KPtr): KPtr {
614        throw new Error('Not implemented');
615    }
616    _ClassDefinitionTypeParamsConst(context: KPtr, node: KPtr): KPtr {
617        throw new Error('Not implemented');
618    }
619    _CreateETSStructDeclaration(context: KPtr, def: KPtr): KPtr {
620        throw new Error('Not implemented');
621    }
622    _CreateClassDeclaration(context: KPtr, def: KPtr): KPtr {
623        throw new Error('Not implemented');
624    }
625    _UpdateClassDeclaration(context: KPtr, original: KPtr, def: KPtr): KPtr {
626        throw new Error('Not implemented');
627    }
628    _CreateClassDefinition1(
629        context: KPtr,
630        ident: KPtr,
631        body: KPtrArray,
632        bodyLen: KInt,
633        modifiers: KInt,
634        flags: KInt
635    ): KPtr {
636        throw new Error('Not implemented');
637    }
638    _ClassDefinitionSetTypeParams(context: KPtr, ast: KPtr, typeParams: KPtr): void {
639        throw new Error('Not implemented');
640    }
641    _ClassDefinitionSetSuper(context: KPtr, ast: KPtr, superClass: KPtr): void {
642        throw new Error('Not implemented');
643    }
644    _UpdateClassDefinition1(
645        context: KPtr,
646        original: KPtr,
647        ident: KPtr,
648        body: KPtrArray,
649        bodyLen: KInt,
650        modifiers: KInt,
651        flags: KInt
652    ): KPtr {
653        throw new Error('Not implemented');
654    }
655    _CreateETSFunctionTypeIr(context: KPtr, signature: KPtr, funcFlags: KInt): KPtr {
656        throw new Error('Not implemented');
657    }
658    _CreateSuperExpression(context: KPtr): KPtr {
659        throw new Error('Not implemented');
660    }
661    _UpdateSuperExpression(context: KPtr, original: KPtr): KPtr {
662        throw new Error('Not implemented');
663    }
664
665    _IsProgram(context: KPtr, node: KPtr): KBoolean {
666        throw new Error('Not implemented');
667    }
668    _AstNodeDumpJSONConst(context: KPtr, node: KPtr): KPtr {
669        throw new Error('Not implemented');
670    }
671    _AstNodeDumpEtsSrcConst(context: KPtr, node: KPtr): KPtr {
672        throw new Error('Not implemented');
673    }
674    _AstNodeUpdateChildren(context: KPtr, node: KPtr): void {
675        throw new Error('Not implemented');
676    }
677    _AstNodeUpdateAll(context: KPtr, node: KPtr): void {
678        throw new Error('Not implemented');
679    }
680    _AstNodeSetOriginalNode(context: KPtr, ast: KPtr, originalNode: KPtr): void {
681        throw new Error('Not implemented');
682    }
683    _AstNodeOriginalNodeConst(context: KPtr, ast: KPtr): KPtr {
684        throw new Error('Not implemented');
685    }
686
687    _VarBinderSetProgram(context: KPtr): void {
688        throw new Error('Not implemented');
689    }
690    _VarBinderSetContext(context: KPtr): void {
691        throw new Error('Not implemented');
692    }
693
694    _VariableDeclaration(context: KPtr, variable: KPtr): KPtr {
695        throw new Error('Not implemented');
696    }
697    _DeclNode(context: KPtr, decl: KPtr): KPtr {
698        throw new Error('Not implemented');
699    }
700
701    _ScopeSetParent(context: KPtr, ast: KPtr, scope: KPtr): void {
702        throw new Error('Not implemented');
703    }
704
705    _CallExpressionSignature(context: KPtr, classInstance: KPtr): KPtr {
706        throw new Error('Not implemented');
707    }
708    _SignatureFunction(context: KPtr, classInstance: KPtr): KPtr {
709        throw new Error('Not implemented');
710    }
711    _DeclarationFromIdentifier(context: KPtr, identifier: KPtr): KPtr {
712        throw new Error('Not implemented');
713    }
714    _IsTSInterfaceDeclaration(ast: KNativePointer): KBoolean {
715        throw new Error('Not implemented');
716    }
717
718    _IsAnnotationDeclaration(ast: KNativePointer): KBoolean {
719        throw new Error('Not implemented');
720    }
721
722    _IsAnnotationUsage(ast: KNativePointer): KBoolean {
723        throw new Error('Not implemented');
724    }
725
726    _IsClassProperty(ast: KNativePointer): KBoolean {
727        throw new Error('Not implemented');
728    }
729
730    _CreateAnnotationUsageIr(context: KPtr, ast: KPtr): KPtr {
731        throw new Error('Not implemented');
732    }
733
734    _IsETSUnionType(ast: KPtr): KBoolean {
735        throw new Error('Not implemented');
736    }
737
738    _IsETSFunctionType(ast: KPtr): KBoolean {
739        throw new Error('Not implemented');
740    }
741    _ProgramExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer {
742        throw new Error('Not implemented');
743    }
744
745    _ExternalSourceName(instance: KNativePointer): KNativePointer {
746        throw new Error('Not implemented');
747    }
748
749    _ExternalSourcePrograms(instance: KNativePointer): KNativePointer {
750        throw new Error('Not implemented');
751    }
752
753    _GenerateTsDeclarationsFromContext(
754        config: KPtr,
755        outputDeclEts: String,
756        outputEts: String,
757        exportAll: KBoolean,
758        recordFile: String
759    ): KPtr {
760        throw new Error('Not implemented');
761    }
762
763    _InsertETSImportDeclarationAndParse(
764        context: KNativePointer,
765        program: KNativePointer,
766        importDeclaration: KNativePointer
767    ): void {
768        throw new Error('Not implemented');
769    }
770
771    _ETSParserGetImportPathManager(context: KNativePointer): KPtr {
772        throw new Error('Not implemented');
773    }
774
775    _CreateSourcePosition(context: KNativePointer, index: KInt, line: KInt): KNativePointer {
776        throw new Error('Not implemented');
777    }
778    _SourcePositionIndex(context: KNativePointer, instance: KNativePointer): KInt {
779        throw new Error('Not implemented');
780    }
781    _SourcePositionLine(context: KNativePointer, instance: KNativePointer): KInt {
782        throw new Error('Not implemented');
783    }
784    _CreateETSStringLiteralType(context: KNativePointer, str: String): KNativePointer {
785        throw new Error('Not implemented');
786    }
787
788    _ClassDefinitionIsFromStructConst(context: KNativePointer, instance: KNativePointer): KBoolean {
789        throw new Error('Not implemented');
790    }
791
792    _ClassDefinitionSetFromStructModifier(context: KNativePointer, instance: KNativePointer): void {
793        throw new Error('Not implemented');
794    }
795
796    _ProgramFileNameConst(context: KPtr, program: KPtr): KNativePointer {
797        throw new Error('Not implemented');
798    }
799
800    _ProgramFileNameWithExtensionConst(context: KPtr, program: KPtr): KNativePointer {
801        throw new Error('Not implemented');
802    }
803
804    _ETSParserGetGlobalProgramAbsName(context: KNativePointer): KNativePointer {
805        throw new Error('Not implemented');
806    }
807
808    _ImportSpecifierIsRemovableConst(context: KNativePointer, instance: KNativePointer): KBoolean {
809        throw new Error('Not implemented');
810    }
811
812    _ImportSpecifierSetRemovable(context: KNativePointer, instance: KNativePointer): void {
813        throw new Error('Not implemented');
814    }
815
816    _ClassPropertyIsDefaultAccessModifierConst(context: KNativePointer, receiver: KNativePointer): boolean {
817        throw new Error('Not implemented');
818    }
819
820    _AstNodeStartConst(context: KNativePointer, receiver: KNativePointer): KNativePointer {
821        throw new Error('Not implemented');
822    }
823
824    _AstNodeEndConst(context: KNativePointer, receiver: KNativePointer): KNativePointer {
825        throw new Error('Not implemented');
826    }
827
828    _ClassVariableDeclaration(context: KNativePointer, classInstance: KNativePointer): KNativePointer {
829        throw new Error('Not implemented');
830    }
831
832    _IsMethodDefinition(node: KPtr): KBoolean {
833        throw new Error('Not implemented');
834    }
835
836    _AstNodeRangeConst(context: KNativePointer, node: KNativePointer): KNativePointer {
837        throw new Error('CreateFunctionDecl was not overloaded by native module initialization');
838    }
839
840    _SourceRangeStart(context: KNativePointer, range: KNativePointer): KNativePointer {
841        throw new Error('CreateFunctionDecl was not overloaded by native module initialization');
842    }
843
844    _SourceRangeEnd(context: KNativePointer, range: KNativePointer): KNativePointer {
845        throw new Error('CreateFunctionDecl was not overloaded by native module initialization');
846    }
847
848    _CreateSourceRange(context: KNativePointer, start: KNativePointer, end: KNativePointer): KNativePointer {
849        throw new Error('CreateFunctionDecl was not overloaded by native module initialization');
850    }
851
852    _IsArrayExpression(node: KPtr): KBoolean {
853        throw new Error('Not implemented');
854    }
855
856    _SetUpSoPath(soPath: string): void {
857        throw new Error('Not implemented');
858    }
859}
860
861export function initEs2panda(): Es2pandaNativeModule {
862    registerNativeModuleLibraryName('NativeModule', path.resolve(__dirname, '../native/es2panda.node'));
863    const instance = new Es2pandaNativeModule();
864    loadNativeModuleLibrary('NativeModule', instance);
865    return instance;
866}
867
868export function initGeneratedEs2panda(): GeneratedEs2pandaNativeModule {
869    registerNativeModuleLibraryName('NativeModule', path.resolve(__dirname, '../native/es2panda.node'));
870    const instance = new GeneratedEs2pandaNativeModule();
871    // registerNativeModule("InteropNativeModule", NativeModule)
872    loadNativeModuleLibrary('NativeModule', instance);
873    return instance;
874}
875