@mirascript/wasm 0.1.0

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/lib/wasm.d.ts ADDED
@@ -0,0 +1,809 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export function compile_buffer(script: Uint8Array, config: Config): CompileResult;
4
+ export function compile(script: string, config: Config): CompileResult;
5
+ export function get_diagnostic_message(code: DiagnosticCode): string | undefined;
6
+ export function keywords(): string[];
7
+ export function control_keywords(): string[];
8
+ export function numeric_keywords(): string[];
9
+ export function constant_keywords(): string[];
10
+ export function reserved_keywords(): string[];
11
+ export function main(): void;
12
+ export enum DiagnosticCode {
13
+ ErrorStart = 1000,
14
+ InternalError = 1001,
15
+ LexerError = 1002,
16
+ ParserError = 1003,
17
+ EmitterError = 1004,
18
+ OptimizerError = 1005,
19
+ Unimplemented = 1006,
20
+ UnknownToken = 1007,
21
+ UnexpectedToken = 1008,
22
+ InvalidReservedKeyword = 1009,
23
+ InvalidKeyword = 1010,
24
+ InvalidNumberLiteralUnderscore = 1011,
25
+ InvalidNumberLiteral = 1012,
26
+ OverflowNumberLiteral = 1013,
27
+ OverflowIntegerLiteral = 1014,
28
+ InvalidOrdinalLiteral = 1015,
29
+ UnterminatedString = 1016,
30
+ InvalidEscapeSequence = 1017,
31
+ InvalidHexEscapeSequence = 1018,
32
+ InvalidUnicodeEscapeSequence = 1019,
33
+ BadArraySpread = 1020,
34
+ UnterminatedInterpolation = 1021,
35
+ BadInterpolation = 1022,
36
+ UnexpectedUnderscore = 1023,
37
+ UnexpectedGlobal = 1024,
38
+ MissingComma = 1025,
39
+ MissingCloseBracket = 1026,
40
+ MissingOpenBrace = 1027,
41
+ MissingCloseBrace = 1028,
42
+ MissingCloseParen = 1029,
43
+ MissingSemicolon = 1030,
44
+ MissingBindOperator = 1031,
45
+ InvalidConstName = 1032,
46
+ MissingFunctionName = 1033,
47
+ MissingOpenParenAfterExtension = 1034,
48
+ MissingOpenParenAfterType = 1035,
49
+ InvalidTypeCall = 1036,
50
+ RecordLiteralInExtensionCaller = 1037,
51
+ MissingCase = 1038,
52
+ UnknownExpression = 1039,
53
+ UnmatchedCloseBrace = 1040,
54
+ UnmatchedCloseBracket = 1041,
55
+ UnmatchedCloseParen = 1042,
56
+ UnknownPattern = 1043,
57
+ UnknownStatement = 1044,
58
+ ExpressionExpected = 1045,
59
+ PatternExpected = 1046,
60
+ ExclamationInLiteralPattern = 1047,
61
+ UnexpectedOperatorInLiteralPattern = 1048,
62
+ MutInRebindPattern = 1049,
63
+ ConstantInBindPattern = 1050,
64
+ MutInDiscardPattern = 1051,
65
+ DiscardInSpreadPattern = 1052,
66
+ SpreadDiscardInRecordPattern = 1053,
67
+ MispositionedSpreadInRecordPattern = 1054,
68
+ InterpolatedNameRecordPattern = 1055,
69
+ BadOmitKeyRecordPattern = 1056,
70
+ AmbiguousRangePattern = 1057,
71
+ DuplicateSpreadPattern = 1058,
72
+ MispositionedRestParameter = 1059,
73
+ UndefinedVariableAssignment = 1060,
74
+ ImmutableVariableAssignment = 1061,
75
+ UninitializedVariable = 1062,
76
+ DuplicateVariableDeclaration = 1063,
77
+ UnexpectedBreak = 1064,
78
+ UnexpectedContinue = 1065,
79
+ MisuseOfGlobalKeyword = 1066,
80
+ BadOmitKeyRecordExpression = 1067,
81
+ UnassignableExpression = 1068,
82
+ ErrorEnd = 1999,
83
+ WarningStart = 2000,
84
+ UnnecessaryParentheses = 2001,
85
+ MisleadingNilVariable = 2002,
86
+ UnnecessaryIrrefutablePattern = 2003,
87
+ MisleadingOrInIrrefutablePattern = 2004,
88
+ WarningEnd = 2999,
89
+ InfoStart = 3000,
90
+ InfoEnd = 3999,
91
+ HintStart = 4000,
92
+ UnusedLocalVariable = 4001,
93
+ UnusedLocalFunction = 4002,
94
+ HintEnd = 4999,
95
+ ReferenceStart = 5000,
96
+ VariableDeclaredHere = 5001,
97
+ FunctionDeclaredHere = 5002,
98
+ ParameterDeclaredHere = 5003,
99
+ ParameterItDeclaredHere = 5004,
100
+ ParameterRestDeclaredHere = 5005,
101
+ ParameterSubPatternDeclaredHere = 5006,
102
+ ReferenceEnd = 5999,
103
+ TagStart = 10000,
104
+ LocalConst = 10001,
105
+ LocalImmutable = 10002,
106
+ LocalMutable = 10003,
107
+ LocalFunction = 10004,
108
+ ParameterIt = 10005,
109
+ ParameterImmutable = 10006,
110
+ ParameterMutable = 10007,
111
+ ParameterImmutableRest = 10008,
112
+ ParameterMutableRest = 10009,
113
+ ParameterPattern = 10010,
114
+ ParameterRestPattern = 10011,
115
+ ParameterSubPatternImmutable = 10012,
116
+ ParameterSubPatternMutable = 10013,
117
+ GlobalVariable = 10014,
118
+ GlobalDynamicAccess = 10015,
119
+ RecordFieldIdName = 10016,
120
+ RecordFieldOrdinalName = 10017,
121
+ RecordFieldStringName = 10018,
122
+ UnnamedRecordField0 = 10019,
123
+ UnnamedRecordField1 = 10020,
124
+ UnnamedRecordField2 = 10021,
125
+ UnnamedRecordField3 = 10022,
126
+ UnnamedRecordField4 = 10023,
127
+ UnnamedRecordField5 = 10024,
128
+ UnnamedRecordField6 = 10025,
129
+ UnnamedRecordField7 = 10026,
130
+ UnnamedRecordField8 = 10027,
131
+ UnnamedRecordField9 = 10028,
132
+ UnnamedRecordFieldN = 10029,
133
+ OmitNamedRecordField = 10030,
134
+ FunctionCall = 10031,
135
+ ExtensionCall = 10032,
136
+ Scope = 10033,
137
+ String = 10034,
138
+ Interpolation = 10035,
139
+ ForExpression = 10036,
140
+ WhileExpression = 10037,
141
+ LoopExpression = 10038,
142
+ FnDeclaration = 10039,
143
+ FnExpression = 10040,
144
+ IfExpression = 10041,
145
+ MatchExpression = 10042,
146
+ TagEnd = 10999,
147
+ TagRefStart = 11000,
148
+ ReadLocal = 11001,
149
+ ReadWriteLocal = 11002,
150
+ WriteLocal = 11003,
151
+ RedeclareLocal = 11004,
152
+ Callable = 11005,
153
+ ArgumentExtension = 11006,
154
+ ArgumentStart = 11007,
155
+ ArgumentEnd = 11008,
156
+ ArgumentComma = 11009,
157
+ ArgumentSpread = 11010,
158
+ KeywordFor = 11011,
159
+ KeywordIn = 11012,
160
+ KeywordWhile = 11013,
161
+ KeywordLoop = 11014,
162
+ KeywordBreak = 11015,
163
+ KeywordContinue = 11016,
164
+ KeywordIf = 11017,
165
+ KeywordElse = 11018,
166
+ KeywordMatch = 11019,
167
+ KeywordCase = 11020,
168
+ KeywordFn = 11021,
169
+ KeywordReturn = 11022,
170
+ /**
171
+ * Work with [DiagnosticCode::OmitNamedRecordField]
172
+ */
173
+ OmitNamedRecordFieldName = 11023,
174
+ TagRefEnd = 11999,
175
+ }
176
+ /**
177
+ * Encoding for counting positions in diagnostics.
178
+ */
179
+ export enum DiagnosticPositionEncoding {
180
+ /**
181
+ * Use the default encoding (UTF-8) and
182
+ * 0-based indexing from the start of the file.
183
+ * Do not convert positions to line-column format.
184
+ */
185
+ None = 0,
186
+ /**
187
+ * Convert positions to 1-based UTF-8 line-column format.
188
+ */
189
+ Utf8 = 1,
190
+ /**
191
+ * Convert positions to 1-based UTF-16 line-column format.
192
+ */
193
+ Utf16 = 2,
194
+ /**
195
+ * Convert positions to 1-based UTF-32 line-column format.
196
+ */
197
+ Utf32 = 3,
198
+ }
199
+ /**
200
+ * Mode for reading input.
201
+ */
202
+ export enum InputMode {
203
+ Script = 0,
204
+ Template = 1,
205
+ }
206
+ export enum OpCode {
207
+ /**
208
+ * No operation
209
+ */
210
+ Noop = 0,
211
+ /**
212
+ * ADD %ret %1 %2\
213
+ * %ret = %1 + %2
214
+ */
215
+ Add = 1,
216
+ /**
217
+ * SUB %ret %1 %2\
218
+ * %ret = %1 - %2
219
+ */
220
+ Sub = 2,
221
+ /**
222
+ * MUL %ret %1 %2\
223
+ * %ret = %1 * %2
224
+ */
225
+ Mul = 3,
226
+ /**
227
+ * DIV %ret %1 %2\
228
+ * %ret = %1 / %2
229
+ */
230
+ Div = 4,
231
+ /**
232
+ * MOD %ret %1 %2\
233
+ * %ret = %1 % %2
234
+ */
235
+ Mod = 5,
236
+ /**
237
+ * EXP %ret %1 %2\
238
+ * %ret = %1 ^ %2
239
+ */
240
+ Pow = 6,
241
+ /**
242
+ * POS %ret %1\
243
+ * %ret = +%1
244
+ */
245
+ Pos = 7,
246
+ /**
247
+ * NEG %ret %1\
248
+ * %ret = -%1
249
+ */
250
+ Neg = 8,
251
+ /**
252
+ * NOT %ret %1\
253
+ * %ret = !%1
254
+ */
255
+ Not = 9,
256
+ /**
257
+ * PLUS %ret %1\
258
+ * %ret = +%1
259
+ */
260
+ Plus = 10,
261
+ /**
262
+ * EQ %ret %1 %2\
263
+ * %ret = %1 == %2
264
+ */
265
+ Eq = 11,
266
+ /**
267
+ * NEQ %ret %1 %2\
268
+ * %ret = %1 != %2
269
+ */
270
+ Neq = 12,
271
+ /**
272
+ * LT %ret %1 %2\
273
+ * %ret = %1 < %2
274
+ */
275
+ Lt = 13,
276
+ /**
277
+ * LTE %ret %1 %2\
278
+ * %ret = %1 <= %2
279
+ */
280
+ Lte = 14,
281
+ /**
282
+ * GT %ret %1 %2\
283
+ * %ret = %1 > %2
284
+ */
285
+ Gt = 15,
286
+ /**
287
+ * GTE %ret %1 %2\
288
+ * %ret = %1 >= %2
289
+ */
290
+ Gte = 16,
291
+ /**
292
+ * AEQ %ret %1 %2\
293
+ * %ret = %1 =~ %2
294
+ */
295
+ Aeq = 17,
296
+ /**
297
+ * NAEQ %ret %1 %2\
298
+ * %ret = %1 !~ %2
299
+ */
300
+ Naeq = 18,
301
+ /**
302
+ * SAME %ret %1 %2\
303
+ * %ret = %1 === %2 // Same value zero
304
+ */
305
+ Same = 19,
306
+ /**
307
+ * Nsame %ret %1 %2\
308
+ * %ret = %1 !== %2
309
+ */
310
+ Nsame = 20,
311
+ /**
312
+ * IN %ret %1 %2\
313
+ * %ret = %1 in %2
314
+ */
315
+ In = 21,
316
+ /**
317
+ * IN_GLOBAL %ret %1 %2\
318
+ * %ret = %1 in global
319
+ */
320
+ InGlobal = 22,
321
+ /**
322
+ * CONCAT %ret `n` %1 %2 ... %n\
323
+ * %ret = %1 .. %2 .. ... .. %n
324
+ */
325
+ Concat = 23,
326
+ /**
327
+ * FORMAT %ret %1 %2\
328
+ * %ret = format(%1, %2)
329
+ */
330
+ Format = 24,
331
+ /**
332
+ * AND %ret %1 %2\
333
+ * %ret = %1 && %2
334
+ */
335
+ And = 25,
336
+ /**
337
+ * OR %ret %1 %2\
338
+ * %ret = %1 || %2
339
+ */
340
+ Or = 26,
341
+ /**
342
+ * ASSERT_INIT %v\
343
+ * assert(%v != uninitialized)
344
+ */
345
+ AssertInit = 27,
346
+ /**
347
+ * ASSERT_NON_NIL %v\
348
+ * assert(%v != nil)
349
+ */
350
+ AssertNonNil = 28,
351
+ /**
352
+ * TYPE %ret %1\
353
+ * %ret = type(%1)
354
+ */
355
+ Type = 29,
356
+ /**
357
+ * TO_BOOLEAN %ret %1\
358
+ * %ret = boolean(%1)
359
+ */
360
+ ToBoolean = 30,
361
+ /**
362
+ * TO_NUMBER %ret %1\
363
+ * %ret = number(%1)
364
+ */
365
+ ToNumber = 31,
366
+ /**
367
+ * TO_STRING %ret %1\
368
+ * %ret = string(%1)
369
+ */
370
+ ToString = 32,
371
+ /**
372
+ * IS_BOOLEAN %ret %1\
373
+ * %ret = type(%1) == "boolean"
374
+ */
375
+ IsBoolean = 33,
376
+ /**
377
+ * IS_NUMBER %ret %1\
378
+ * %ret = type(%1) == "number"
379
+ */
380
+ IsNumber = 34,
381
+ /**
382
+ * IS_STRING %ret %1\
383
+ * %ret = type(%1) == "string"
384
+ */
385
+ IsString = 35,
386
+ /**
387
+ * IS_RECORD %ret %1\
388
+ * %ret = type(%1) == "record"
389
+ */
390
+ IsRecord = 36,
391
+ /**
392
+ * IS_ARRAY %ret %1\
393
+ * %ret = type(%1) == "array"
394
+ */
395
+ IsArray = 37,
396
+ /**
397
+ * CONSTANT %reg `index`\
398
+ * %reg = CONSTANTS\[index]
399
+ */
400
+ Constant = 38,
401
+ /**
402
+ * UNINIT %reg
403
+ * %reg = uninitialized
404
+ */
405
+ Uninit = 39,
406
+ /**
407
+ * ASSIGN %ret %1\
408
+ * %ret = %1
409
+ */
410
+ Assign = 40,
411
+ /**
412
+ * SWAP %1 %2\
413
+ * (%1, %2) = (%2, %1)
414
+ */
415
+ Swap = 41,
416
+ /**
417
+ * GET_UPVALUE %ret `level` %%up\
418
+ * %ret = UPVALUES\[level]\[%%up]
419
+ */
420
+ GetUpvalue = 42,
421
+ /**
422
+ * SET_UPVALUE %value `level` %%up \
423
+ * UPVALUES\[level]\[%%up] = %value
424
+ */
425
+ SetUpvalue = 43,
426
+ /**
427
+ * GET_GLOBAL %ret `name` \
428
+ * %ret = GLOBALS\[CONSTANTS\[name]]
429
+ */
430
+ GetGlobal = 44,
431
+ /**
432
+ * GET_GLOBAL_DYN %ret %name \
433
+ * %ret = GLOBALS\[%name]
434
+ */
435
+ GetGlobalDyn = 45,
436
+ /**
437
+ * RECORD %ret\
438
+ * %ret = (
439
+ */
440
+ Record = 46,
441
+ /**
442
+ * FIELD `name` %field\
443
+ * \[CONSTANTS\[name]]: %field,
444
+ */
445
+ Field = 47,
446
+ /**
447
+ * FIELD_DYN %name %field\
448
+ * \[%name]: %field,
449
+ */
450
+ FieldDyn = 48,
451
+ /**
452
+ * FIELD_INDEX `index` %field\
453
+ * \[index]: %field,
454
+ */
455
+ FieldIndex = 49,
456
+ /**
457
+ * FIELD_OPT `name` %field\
458
+ * \[CONSTANTS\[name]]?: %field,
459
+ */
460
+ FieldOpt = 50,
461
+ /**
462
+ * FIELD_OPT_DYN %name %field\
463
+ * \[%name]?: %field,
464
+ */
465
+ FieldOptDyn = 51,
466
+ /**
467
+ * FIELD_OPT_INDEX `index` %field\
468
+ * \[index]?: %field,
469
+ */
470
+ FieldOptIndex = 52,
471
+ /**
472
+ * PICK %ret %var `n` `key_1` `key_2` ... `key_n`\
473
+ * %ret = %var pick keys CONSTANTS\[key_1], CONSTANTS\[key_2], ..., CONSTANTS\[key_n]
474
+ */
475
+ Pick = 53,
476
+ /**
477
+ * OMIT %ret %var `n` `key_1` `key_2` ... `key_n`\
478
+ * %ret = %var omit keys CONSTANTS\[key_1], CONSTANTS\[key_2], ..., CONSTANTS\[key_n]
479
+ */
480
+ Omit = 54,
481
+ /**
482
+ * ARRAY %ret\
483
+ * %ret = \[
484
+ */
485
+ Array = 55,
486
+ /**
487
+ * ITEM %item\
488
+ * %item,
489
+ */
490
+ Item = 56,
491
+ /**
492
+ * ITEM_RANGE `start` `end`\
493
+ * `start`..`end`,
494
+ */
495
+ ItemRange = 57,
496
+ /**
497
+ * ITEM_RANGE_DYN %start %end\
498
+ * %start..%end,
499
+ */
500
+ ItemRangeDyn = 58,
501
+ /**
502
+ * ITEM_RANGE_EXCLUSIVE_DYN %start %end\
503
+ * %start..<%end,
504
+ */
505
+ ItemRangeExclusiveDyn = 59,
506
+ /**
507
+ * SPREAD %var\
508
+ * ..%var,
509
+ */
510
+ Spread = 60,
511
+ /**
512
+ * FREEZE\
513
+ * ) for record or ] for array
514
+ */
515
+ Freeze = 61,
516
+ /**
517
+ * HAS %ret %var `key`\
518
+ * %ret = initialized(%var\[CONSTANTS\[key]])
519
+ */
520
+ Has = 62,
521
+ /**
522
+ * HAS_DYN %ret %var %key\
523
+ * %ret = initialized(%var\[%key])
524
+ */
525
+ HasDyn = 63,
526
+ /**
527
+ * HAS_INDEX %ret %var `index`\
528
+ * %ret = initialized(%var\[index])
529
+ */
530
+ HasIndex = 64,
531
+ /**
532
+ * GET %ret %var `key`\
533
+ * %ret = %var\[CONSTANTS\[key]] ?? nil
534
+ */
535
+ Get = 65,
536
+ /**
537
+ * GET_DYN %ret %var %key\
538
+ * %ret = %var\[%key] ?? nil
539
+ */
540
+ GetDyn = 66,
541
+ /**
542
+ * GET_INDEX %ret %var `index`\
543
+ * %ret = %var\[index] ?? nil
544
+ */
545
+ GetIndex = 67,
546
+ /**
547
+ * SET %value %var `key`\
548
+ * %var\[CONSTANTS\[key]] = %value
549
+ */
550
+ Set = 68,
551
+ /**
552
+ * SET_DYN %value %var %key\
553
+ * %var\[%key] = %value
554
+ */
555
+ SetDyn = 69,
556
+ /**
557
+ * SET_INDEX %value %var `index`\
558
+ * %var\[index] = %value
559
+ */
560
+ SetIndex = 70,
561
+ /**
562
+ * SLICE %ret %var `start` `end`\
563
+ * %ret = %var\[start..end]
564
+ */
565
+ Slice = 71,
566
+ /**
567
+ * SLICE_START %ret %var `end`\
568
+ * %ret = %var\[..end]
569
+ */
570
+ SliceStart = 72,
571
+ /**
572
+ * SLICE_END %ret %var `start`\
573
+ * %ret = %var\[start..]
574
+ */
575
+ SliceEnd = 73,
576
+ /**
577
+ * SLICE_DYN %ret %var %start %end\
578
+ * %ret = %var\[%start..%end]
579
+ */
580
+ SliceDyn = 74,
581
+ /**
582
+ * SLICE_EXCLUSIVE_DYN %ret %var %start %end\
583
+ * %ret = %var\[%start..<%end]
584
+ */
585
+ SliceExclusiveDyn = 75,
586
+ /**
587
+ * LENGTH %ret %var\
588
+ * %ret = $Length(%var)
589
+ */
590
+ Length = 76,
591
+ /**
592
+ * LOOP `regn`\
593
+ * loop { let %1, .. ,%regn;
594
+ */
595
+ Loop = 77,
596
+ /**
597
+ * LOOP_FOR `regn` %iterable\
598
+ * for %1 in %iterable { let %2, .. ,%regn;
599
+ */
600
+ LoopFor = 78,
601
+ /**
602
+ * LOOP_RANGE `regn` %start %end\
603
+ * for %1 in %start..%end { let %2, .. ,%regn;
604
+ */
605
+ LoopRange = 79,
606
+ /**
607
+ * LOOP_RANGE_EXCLUSIVE `regn` %start %end\
608
+ * for %1 in %start..<%end { let %2, .. ,%regn;
609
+ */
610
+ LoopRangeExclusive = 80,
611
+ /**
612
+ * LOOP_END\
613
+ * }
614
+ */
615
+ LoopEnd = 81,
616
+ /**
617
+ * BREAK\
618
+ * break;
619
+ */
620
+ Break = 82,
621
+ /**
622
+ * CONTINUE\
623
+ * continue;
624
+ */
625
+ Continue = 83,
626
+ /**
627
+ * IF %cond\
628
+ * if (%cond) {
629
+ */
630
+ If = 84,
631
+ /**
632
+ * IF_NOT %cond\
633
+ * if (!%cond) {
634
+ */
635
+ IfNot = 85,
636
+ /**
637
+ * IF_INIT %var\
638
+ * if (initialized(%var)) {
639
+ */
640
+ IfInit = 86,
641
+ /**
642
+ * IF_NOT_INIT %var\
643
+ * if (!initialized(%var)) {
644
+ */
645
+ IfNotInit = 87,
646
+ /**
647
+ * IF_NIL %var\
648
+ * if (%var == nil) {
649
+ */
650
+ IfNil = 88,
651
+ /**
652
+ * IF_NOT_NIL %var\
653
+ * if (%var != nil) {
654
+ */
655
+ IfNotNil = 89,
656
+ /**
657
+ * ELSE\
658
+ * } else {
659
+ */
660
+ Else = 90,
661
+ /**
662
+ * EL_IF IF*\
663
+ * } else if *** {\
664
+ * This instruction must be followed by an `IF*` instruction\
665
+ */
666
+ ElIf = 91,
667
+ /**
668
+ * IF_END\
669
+ * }
670
+ */
671
+ IfEnd = 92,
672
+ /**
673
+ * FUNC %f `argn` `regn`\
674
+ * %f = (%1, %2, ... , %argn) => { let %argn+1, ... , %regn;
675
+ */
676
+ Func = 93,
677
+ /**
678
+ * FUNC_VARG %f `argn` `regn`\
679
+ * %f = (%1, %2, ... , %argn-1, ...%argn) => { let %argn+1, ... , %regn;
680
+ */
681
+ FuncVarg = 94,
682
+ /**
683
+ * FUNC_END\
684
+ * }
685
+ */
686
+ FuncEnd = 95,
687
+ /**
688
+ * RETURN %value\
689
+ * return %value;
690
+ */
691
+ Return = 96,
692
+ /**
693
+ * CALL %ret `f` `argn` %1 %2 ... %argn `spread_n` `spread_arg_a` ...\
694
+ * %ret = GLOBAL[CONSTANTS[f]](%1, %2, ... , %argn);
695
+ *
696
+ * If spread_arg_a is present, arg at that index will be spread
697
+ */
698
+ Call = 97,
699
+ /**
700
+ * CALL_DYN %ret %f `argn` %1 %2 ... %argn `spread_n` `spread_arg_a` ...\
701
+ * %ret = %f(%1, %2, ... , %argn);
702
+ *
703
+ * If spread_arg_a is present, arg at that index will be spread
704
+ */
705
+ CallDyn = 98,
706
+ }
707
+ export class CompileResult {
708
+ private constructor();
709
+ free(): void;
710
+ [Symbol.dispose](): void;
711
+ chunk(): Uint8Array | undefined;
712
+ diagnostics(): Uint32Array;
713
+ }
714
+ export class Config {
715
+ free(): void;
716
+ [Symbol.dispose](): void;
717
+ constructor();
718
+ track_references: boolean;
719
+ trivia: boolean;
720
+ input_mode: InputMode;
721
+ diagnostic_position_encoding: DiagnosticPositionEncoding;
722
+ diagnostic_error: boolean;
723
+ diagnostic_warning: boolean;
724
+ diagnostic_info: boolean;
725
+ diagnostic_hint: boolean;
726
+ diagnostic_reference: boolean;
727
+ diagnostic_other: boolean;
728
+ }
729
+ export class MonacoCompiler {
730
+ free(): void;
731
+ [Symbol.dispose](): void;
732
+ constructor(input: string, config: Config);
733
+ parse(): boolean;
734
+ emit(): Uint8Array | undefined;
735
+ format(): string | undefined;
736
+ diagnostics(): Uint32Array;
737
+ }
738
+
739
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
740
+
741
+ export interface InitOutput {
742
+ readonly memory: WebAssembly.Memory;
743
+ readonly __wbg_compileresult_free: (a: number, b: number) => void;
744
+ readonly compileresult_chunk: (a: number, b: number) => void;
745
+ readonly compileresult_diagnostics: (a: number, b: number) => void;
746
+ readonly compile_buffer: (a: number, b: number, c: number) => number;
747
+ readonly compile: (a: number, b: number, c: number) => number;
748
+ readonly get_diagnostic_message: (a: number, b: number) => void;
749
+ readonly keywords: (a: number) => void;
750
+ readonly control_keywords: (a: number) => void;
751
+ readonly numeric_keywords: (a: number) => void;
752
+ readonly constant_keywords: (a: number) => void;
753
+ readonly reserved_keywords: (a: number) => void;
754
+ readonly __wbg_monacocompiler_free: (a: number, b: number) => void;
755
+ readonly monacocompiler_new: (a: number, b: number, c: number) => number;
756
+ readonly monacocompiler_parse: (a: number) => number;
757
+ readonly monacocompiler_emit: (a: number, b: number) => void;
758
+ readonly monacocompiler_format: (a: number, b: number) => void;
759
+ readonly monacocompiler_diagnostics: (a: number, b: number) => void;
760
+ readonly main: () => void;
761
+ readonly __wbg_config_free: (a: number, b: number) => void;
762
+ readonly __wbg_get_config_track_references: (a: number) => number;
763
+ readonly __wbg_set_config_track_references: (a: number, b: number) => void;
764
+ readonly __wbg_get_config_trivia: (a: number) => number;
765
+ readonly __wbg_set_config_trivia: (a: number, b: number) => void;
766
+ readonly __wbg_get_config_input_mode: (a: number) => number;
767
+ readonly __wbg_set_config_input_mode: (a: number, b: number) => void;
768
+ readonly __wbg_get_config_diagnostic_position_encoding: (a: number) => number;
769
+ readonly __wbg_set_config_diagnostic_position_encoding: (a: number, b: number) => void;
770
+ readonly __wbg_get_config_diagnostic_error: (a: number) => number;
771
+ readonly __wbg_set_config_diagnostic_error: (a: number, b: number) => void;
772
+ readonly __wbg_get_config_diagnostic_warning: (a: number) => number;
773
+ readonly __wbg_set_config_diagnostic_warning: (a: number, b: number) => void;
774
+ readonly __wbg_get_config_diagnostic_info: (a: number) => number;
775
+ readonly __wbg_set_config_diagnostic_info: (a: number, b: number) => void;
776
+ readonly __wbg_get_config_diagnostic_hint: (a: number) => number;
777
+ readonly __wbg_set_config_diagnostic_hint: (a: number, b: number) => void;
778
+ readonly __wbg_get_config_diagnostic_reference: (a: number) => number;
779
+ readonly __wbg_set_config_diagnostic_reference: (a: number, b: number) => void;
780
+ readonly __wbg_get_config_diagnostic_other: (a: number) => number;
781
+ readonly __wbg_set_config_diagnostic_other: (a: number, b: number) => void;
782
+ readonly config_new: () => number;
783
+ readonly __wbindgen_export_0: (a: number, b: number, c: number) => void;
784
+ readonly __wbindgen_export_1: (a: number, b: number) => number;
785
+ readonly __wbindgen_export_2: (a: number, b: number, c: number, d: number) => number;
786
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
787
+ readonly __wbindgen_start: () => void;
788
+ }
789
+
790
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
791
+ /**
792
+ * Instantiates the given `module`, which can either be bytes or
793
+ * a precompiled `WebAssembly.Module`.
794
+ *
795
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
796
+ *
797
+ * @returns {InitOutput}
798
+ */
799
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
800
+
801
+ /**
802
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
803
+ * for everything else, calls `WebAssembly.instantiate` directly.
804
+ *
805
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
806
+ *
807
+ * @returns {Promise<InitOutput>}
808
+ */
809
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;