greybel-interpreter 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.
Files changed (81) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -0
  3. package/dist/context.d.ts +68 -0
  4. package/dist/context.js +399 -0
  5. package/dist/cps.d.ts +15 -0
  6. package/dist/cps.js +438 -0
  7. package/dist/custom-types/boolean.d.ts +10 -0
  8. package/dist/custom-types/boolean.js +41 -0
  9. package/dist/custom-types/list.d.ts +25 -0
  10. package/dist/custom-types/list.js +281 -0
  11. package/dist/custom-types/map.d.ts +28 -0
  12. package/dist/custom-types/map.js +289 -0
  13. package/dist/custom-types/nil.d.ts +8 -0
  14. package/dist/custom-types/nil.js +38 -0
  15. package/dist/custom-types/number.d.ts +10 -0
  16. package/dist/custom-types/number.js +41 -0
  17. package/dist/custom-types/string.d.ts +21 -0
  18. package/dist/custom-types/string.js +132 -0
  19. package/dist/expressions/assign.d.ts +12 -0
  20. package/dist/expressions/assign.js +156 -0
  21. package/dist/expressions/binary-negated-expression.d.ts +18 -0
  22. package/dist/expressions/binary-negated-expression.js +115 -0
  23. package/dist/expressions/call.d.ts +13 -0
  24. package/dist/expressions/call.js +177 -0
  25. package/dist/expressions/list.d.ts +13 -0
  26. package/dist/expressions/list.js +119 -0
  27. package/dist/expressions/logical-and-binary.d.ts +22 -0
  28. package/dist/expressions/logical-and-binary.js +188 -0
  29. package/dist/expressions/map.d.ts +18 -0
  30. package/dist/expressions/map.js +171 -0
  31. package/dist/expressions/path.d.ts +30 -0
  32. package/dist/expressions/path.js +310 -0
  33. package/dist/index.d.ts +35 -0
  34. package/dist/index.js +82 -0
  35. package/dist/interpreter.d.ts +20 -0
  36. package/dist/interpreter.js +55 -0
  37. package/dist/operations/argument.d.ts +8 -0
  38. package/dist/operations/argument.js +129 -0
  39. package/dist/operations/body.d.ts +8 -0
  40. package/dist/operations/body.js +144 -0
  41. package/dist/operations/break.d.ts +7 -0
  42. package/dist/operations/break.js +34 -0
  43. package/dist/operations/continue.d.ts +7 -0
  44. package/dist/operations/continue.js +34 -0
  45. package/dist/operations/debugger.d.ts +7 -0
  46. package/dist/operations/debugger.js +32 -0
  47. package/dist/operations/else-if.d.ts +12 -0
  48. package/dist/operations/else-if.js +31 -0
  49. package/dist/operations/else.d.ts +10 -0
  50. package/dist/operations/else.js +30 -0
  51. package/dist/operations/for.d.ts +16 -0
  52. package/dist/operations/for.js +139 -0
  53. package/dist/operations/function.d.ts +21 -0
  54. package/dist/operations/function.js +125 -0
  55. package/dist/operations/if-statement.d.ts +8 -0
  56. package/dist/operations/if-statement.js +138 -0
  57. package/dist/operations/if.d.ts +12 -0
  58. package/dist/operations/if.js +31 -0
  59. package/dist/operations/new.d.ts +11 -0
  60. package/dist/operations/new.js +96 -0
  61. package/dist/operations/not.d.ts +11 -0
  62. package/dist/operations/not.js +95 -0
  63. package/dist/operations/reference.d.ts +11 -0
  64. package/dist/operations/reference.js +102 -0
  65. package/dist/operations/return.d.ts +11 -0
  66. package/dist/operations/return.js +102 -0
  67. package/dist/operations/top.d.ts +12 -0
  68. package/dist/operations/top.js +84 -0
  69. package/dist/operations/while.d.ts +14 -0
  70. package/dist/operations/while.js +123 -0
  71. package/dist/resource.d.ts +9 -0
  72. package/dist/resource.js +29 -0
  73. package/dist/typer.d.ts +6 -0
  74. package/dist/typer.js +99 -0
  75. package/dist/types/custom-type.d.ts +19 -0
  76. package/dist/types/custom-type.js +58 -0
  77. package/dist/types/expression.d.ts +6 -0
  78. package/dist/types/expression.js +9 -0
  79. package/dist/types/operation.d.ts +9 -0
  80. package/dist/types/operation.js +38 -0
  81. package/package.json +45 -0
package/dist/cps.js ADDED
@@ -0,0 +1,438 @@
1
+ "use strict";
2
+ var __values = (this && this.__values) || function(o) {
3
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4
+ if (m) return m.call(o);
5
+ if (o && typeof o.length === "number") return {
6
+ next: function () {
7
+ if (o && i >= o.length) o = void 0;
8
+ return { value: o && o[i++], done: !o };
9
+ }
10
+ };
11
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.CPSMap = void 0;
18
+ var greybel_core_1 = require("greybel-core");
19
+ var assign_1 = __importDefault(require("./expressions/assign"));
20
+ var call_1 = __importDefault(require("./expressions/call"));
21
+ var list_1 = __importDefault(require("./expressions/list"));
22
+ var logical_and_binary_1 = __importDefault(require("./expressions/logical-and-binary"));
23
+ var map_1 = __importDefault(require("./expressions/map"));
24
+ var path_1 = __importDefault(require("./expressions/path"));
25
+ var binary_negated_expression_1 = __importDefault(require("./expressions/binary-negated-expression"));
26
+ var argument_1 = __importDefault(require("./operations/argument"));
27
+ var while_1 = __importDefault(require("./operations/while"));
28
+ var for_1 = __importDefault(require("./operations/for"));
29
+ var return_1 = __importDefault(require("./operations/return"));
30
+ var reference_1 = __importDefault(require("./operations/reference"));
31
+ var new_1 = __importDefault(require("./operations/new"));
32
+ var not_1 = __importDefault(require("./operations/not"));
33
+ var if_statement_1 = __importDefault(require("./operations/if-statement"));
34
+ var if_1 = __importDefault(require("./operations/if"));
35
+ var else_if_1 = __importDefault(require("./operations/else-if"));
36
+ var else_1 = __importDefault(require("./operations/else"));
37
+ var continue_1 = __importDefault(require("./operations/continue"));
38
+ var break_1 = __importDefault(require("./operations/break"));
39
+ var body_1 = __importDefault(require("./operations/body"));
40
+ var debugger_1 = __importDefault(require("./operations/debugger"));
41
+ var function_1 = __importDefault(require("./operations/function"));
42
+ var boolean_1 = __importDefault(require("./custom-types/boolean"));
43
+ var number_1 = __importDefault(require("./custom-types/number"));
44
+ var string_1 = __importDefault(require("./custom-types/string"));
45
+ var nil_1 = __importDefault(require("./custom-types/nil"));
46
+ var CPSMap = function (visit, context) {
47
+ return {
48
+ 'AssignmentStatement': function (item) {
49
+ return new assign_1.default(item, visit);
50
+ },
51
+ 'MemberExpression': function (item) {
52
+ return new path_1.default(item, visit);
53
+ },
54
+ 'FunctionDeclaration': function (item) {
55
+ var e_1, _a, e_2, _b;
56
+ var args = new argument_1.default(item.parameters);
57
+ var body = new body_1.default(item.body);
58
+ try {
59
+ for (var _c = __values(item.parameters), _d = _c.next(); !_d.done; _d = _c.next()) {
60
+ var parameterItem = _d.value;
61
+ args.stack.push(visit(parameterItem));
62
+ }
63
+ }
64
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
65
+ finally {
66
+ try {
67
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
68
+ }
69
+ finally { if (e_1) throw e_1.error; }
70
+ }
71
+ try {
72
+ for (var _e = __values(item.body), _f = _e.next(); !_f.done; _f = _e.next()) {
73
+ var bodyItem = _f.value;
74
+ body.stack.push(visit(bodyItem));
75
+ }
76
+ }
77
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
78
+ finally {
79
+ try {
80
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
81
+ }
82
+ finally { if (e_2) throw e_2.error; }
83
+ }
84
+ return new function_1.default(item, {
85
+ args: args,
86
+ body: body
87
+ });
88
+ },
89
+ 'MapConstructorExpression': function (item) {
90
+ return new map_1.default(item, visit);
91
+ },
92
+ 'Identifier': function (item) {
93
+ return new path_1.default(item, visit);
94
+ },
95
+ 'ReturnStatement': function (item) {
96
+ var arg = visit(item.argument);
97
+ return new return_1.default(item, {
98
+ arg: arg
99
+ });
100
+ },
101
+ 'NumericLiteral': function (item) {
102
+ // @ts-ignore: Key is always a literal
103
+ return new number_1.default(item.value);
104
+ },
105
+ 'WhileStatement': function (item) {
106
+ var e_3, _a;
107
+ var body = new body_1.default(item.body);
108
+ var condition = visit(item.condition);
109
+ try {
110
+ for (var _b = __values(item.body), _c = _b.next(); !_c.done; _c = _b.next()) {
111
+ var bodyItem = _c.value;
112
+ body.stack.push(visit(bodyItem));
113
+ }
114
+ }
115
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
116
+ finally {
117
+ try {
118
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
119
+ }
120
+ finally { if (e_3) throw e_3.error; }
121
+ }
122
+ return new while_1.default(item, {
123
+ body: body,
124
+ condition: condition
125
+ });
126
+ },
127
+ 'StringLiteral': function (item) {
128
+ // @ts-ignore: Key is always a literal
129
+ return new string_1.default(item.value);
130
+ },
131
+ 'IndexExpression': function (item) {
132
+ return new path_1.default(item, visit);
133
+ },
134
+ 'FeatureEnvarExpression': function (_item) {
135
+ throw new Error('Not supported');
136
+ },
137
+ 'IfShortcutStatement': function (item) {
138
+ var e_4, _a;
139
+ var op = new if_statement_1.default(item);
140
+ try {
141
+ for (var _b = __values(item.clauses), _c = _b.next(); !_c.done; _c = _b.next()) {
142
+ var clausesItem = _c.value;
143
+ op.clauses.push(visit(clausesItem));
144
+ }
145
+ }
146
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
147
+ finally {
148
+ try {
149
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
150
+ }
151
+ finally { if (e_4) throw e_4.error; }
152
+ }
153
+ return op;
154
+ },
155
+ 'IfShortcutClause': function (item) {
156
+ var e_5, _a;
157
+ var body = new body_1.default(item.body);
158
+ var condition = visit(item.condition);
159
+ try {
160
+ for (var _b = __values(item.body), _c = _b.next(); !_c.done; _c = _b.next()) {
161
+ var bodyItem = _c.value;
162
+ body.stack.push(visit(bodyItem));
163
+ }
164
+ }
165
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
166
+ finally {
167
+ try {
168
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
169
+ }
170
+ finally { if (e_5) throw e_5.error; }
171
+ }
172
+ return new if_1.default(item, {
173
+ condition: condition,
174
+ body: body
175
+ });
176
+ },
177
+ 'ElseifShortcutClause': function (item) {
178
+ var e_6, _a;
179
+ var body = new body_1.default(item.body);
180
+ var condition = visit(item.condition);
181
+ try {
182
+ for (var _b = __values(item.body), _c = _b.next(); !_c.done; _c = _b.next()) {
183
+ var bodyItem = _c.value;
184
+ body.stack.push(visit(bodyItem));
185
+ }
186
+ }
187
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
188
+ finally {
189
+ try {
190
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
191
+ }
192
+ finally { if (e_6) throw e_6.error; }
193
+ }
194
+ return new else_if_1.default(item, {
195
+ body: body,
196
+ condition: condition
197
+ });
198
+ },
199
+ 'ElseShortcutClause': function (item) {
200
+ var e_7, _a;
201
+ var body = new body_1.default(item.body);
202
+ try {
203
+ for (var _b = __values(item.body), _c = _b.next(); !_c.done; _c = _b.next()) {
204
+ var bodyItem = _c.value;
205
+ body.stack.push(visit(bodyItem));
206
+ }
207
+ }
208
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
209
+ finally {
210
+ try {
211
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
212
+ }
213
+ finally { if (e_7) throw e_7.error; }
214
+ }
215
+ return new else_1.default(item, {
216
+ body: body
217
+ });
218
+ },
219
+ 'NilLiteral': function (item) {
220
+ return new nil_1.default();
221
+ },
222
+ 'ForGenericStatement': function (item) {
223
+ var e_8, _a;
224
+ var body = new body_1.default(item.body);
225
+ var variable = visit(item.variable);
226
+ var iterator = visit(item.iterator);
227
+ try {
228
+ for (var _b = __values(item.body), _c = _b.next(); !_c.done; _c = _b.next()) {
229
+ var bodyItem = _c.value;
230
+ body.stack.push(visit(bodyItem));
231
+ }
232
+ }
233
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
234
+ finally {
235
+ try {
236
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
237
+ }
238
+ finally { if (e_8) throw e_8.error; }
239
+ }
240
+ return new for_1.default(item, {
241
+ body: body,
242
+ variable: variable,
243
+ iterator: iterator
244
+ });
245
+ },
246
+ 'IfStatement': function (item) {
247
+ var e_9, _a;
248
+ var op = new if_statement_1.default(item);
249
+ try {
250
+ for (var _b = __values(item.clauses), _c = _b.next(); !_c.done; _c = _b.next()) {
251
+ var clausesItem = _c.value;
252
+ op.clauses.push(visit(clausesItem));
253
+ }
254
+ }
255
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
256
+ finally {
257
+ try {
258
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
259
+ }
260
+ finally { if (e_9) throw e_9.error; }
261
+ }
262
+ return op;
263
+ },
264
+ 'IfClause': function (item) {
265
+ var e_10, _a;
266
+ var body = new body_1.default(item.body);
267
+ var condition = visit(item.condition);
268
+ try {
269
+ for (var _b = __values(item.body), _c = _b.next(); !_c.done; _c = _b.next()) {
270
+ var bodyItem = _c.value;
271
+ body.stack.push(visit(bodyItem));
272
+ }
273
+ }
274
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
275
+ finally {
276
+ try {
277
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
278
+ }
279
+ finally { if (e_10) throw e_10.error; }
280
+ }
281
+ return new if_1.default(item, {
282
+ body: body,
283
+ condition: condition
284
+ });
285
+ },
286
+ 'ElseifClause': function (item) {
287
+ var e_11, _a;
288
+ var body = new body_1.default(item.body);
289
+ var condition = visit(item.condition);
290
+ try {
291
+ for (var _b = __values(item.body), _c = _b.next(); !_c.done; _c = _b.next()) {
292
+ var bodyItem = _c.value;
293
+ body.stack.push(visit(bodyItem));
294
+ }
295
+ }
296
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
297
+ finally {
298
+ try {
299
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
300
+ }
301
+ finally { if (e_11) throw e_11.error; }
302
+ }
303
+ return new else_if_1.default(item, {
304
+ body: body,
305
+ condition: condition
306
+ });
307
+ },
308
+ 'ElseClause': function (item) {
309
+ var e_12, _a;
310
+ var body = new body_1.default(item.body);
311
+ try {
312
+ for (var _b = __values(item.body), _c = _b.next(); !_c.done; _c = _b.next()) {
313
+ var bodyItem = _c.value;
314
+ body.stack.push(visit(bodyItem));
315
+ }
316
+ }
317
+ catch (e_12_1) { e_12 = { error: e_12_1 }; }
318
+ finally {
319
+ try {
320
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
321
+ }
322
+ finally { if (e_12) throw e_12.error; }
323
+ }
324
+ return new else_1.default(item, {
325
+ body: body
326
+ });
327
+ },
328
+ 'NegationExpression': function (item) {
329
+ var arg = visit(item.argument);
330
+ return new not_1.default(item, { arg: arg });
331
+ },
332
+ 'ContinueStatement': function (item) {
333
+ return new continue_1.default(item);
334
+ },
335
+ 'BreakStatement': function (item) {
336
+ return new break_1.default(item);
337
+ },
338
+ 'CallExpression': function (item) {
339
+ return new call_1.default(item, visit);
340
+ },
341
+ 'CallStatement': function (item) {
342
+ return new call_1.default(item, visit);
343
+ },
344
+ 'FeatureImportExpression': function (_item) {
345
+ throw new Error('Not supported');
346
+ },
347
+ 'FeatureIncludeExpression': function (_item) {
348
+ throw new Error('Not supported');
349
+ },
350
+ 'ImportCodeExpression': function (item) {
351
+ var resourceHandler = context.resourceHandler;
352
+ var target = resourceHandler.getTargetRelativeTo(context.target,
353
+ // @ts-ignore: FileSystemDirectory is always a string
354
+ item.fileSystemDirectory.value);
355
+ var code = context.resourceHandler.get(target);
356
+ var parser = new greybel_core_1.Parser(code);
357
+ var chunk = parser.parseChunk();
358
+ return visit(chunk);
359
+ },
360
+ 'FeatureDebuggerExpression': function (item) {
361
+ return new debugger_1.default(item);
362
+ },
363
+ 'ListConstructorExpression': function (item) {
364
+ return new list_1.default(item, visit);
365
+ },
366
+ 'BooleanLiteral': function (item) {
367
+ // @ts-ignore: Key is always a literal
368
+ return new boolean_1.default(item.value);
369
+ },
370
+ 'EmptyExpression': function (item) { },
371
+ 'BinaryExpression': function (item) {
372
+ return new logical_and_binary_1.default(item, visit);
373
+ },
374
+ 'BinaryNegatedExpression': function (item) {
375
+ return new binary_negated_expression_1.default(item, visit);
376
+ },
377
+ 'LogicalExpression': function (item) {
378
+ return new logical_and_binary_1.default(item, visit);
379
+ },
380
+ 'UnaryExpression': function (item) {
381
+ var arg = visit(item.argument);
382
+ var op;
383
+ if ('@' === item.operator) {
384
+ op = new reference_1.default(item, { arg: arg });
385
+ }
386
+ else if ('new' === item.operator) {
387
+ op = new new_1.default(item, { arg: arg });
388
+ }
389
+ else {
390
+ throw new Error('Unknown unary expression.');
391
+ }
392
+ return op;
393
+ },
394
+ 'Chunk': function (item) {
395
+ var e_13, _a;
396
+ var op = new body_1.default(item.body);
397
+ try {
398
+ for (var _b = __values(item.body), _c = _b.next(); !_c.done; _c = _b.next()) {
399
+ var bodyItem = _c.value;
400
+ op.stack.push(visit(bodyItem));
401
+ }
402
+ }
403
+ catch (e_13_1) { e_13 = { error: e_13_1 }; }
404
+ finally {
405
+ try {
406
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
407
+ }
408
+ finally { if (e_13) throw e_13.error; }
409
+ }
410
+ return op;
411
+ }
412
+ };
413
+ };
414
+ exports.CPSMap = CPSMap;
415
+ var CPS = /** @class */ (function () {
416
+ function CPS(context) {
417
+ var me = this;
418
+ me.cpsMap = (0, exports.CPSMap)(me.visit.bind(me), context);
419
+ }
420
+ CPS.prototype.visit = function (o) {
421
+ var me = this;
422
+ if (o == null)
423
+ return '';
424
+ if (o.type == null) {
425
+ console.error('Error ast type:', o);
426
+ throw new Error('Unexpected as type');
427
+ }
428
+ var fn = me.cpsMap[o.type];
429
+ if (fn == null) {
430
+ console.error('Error ast:', o);
431
+ throw new Error('Type does not exist ' + o.type);
432
+ }
433
+ var result = fn.call(me, o);
434
+ return result;
435
+ };
436
+ return CPS;
437
+ }());
438
+ exports.default = CPS;
@@ -0,0 +1,10 @@
1
+ import { CustomLiteralType } from '../types/custom-type';
2
+ export default class CustomBoolean extends CustomLiteralType {
3
+ static intrinsics: Map<string, Function>;
4
+ value: boolean;
5
+ constructor(value: boolean);
6
+ getType(): string;
7
+ valueOf(): boolean;
8
+ toString(): string;
9
+ fork(): CustomBoolean;
10
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var custom_type_1 = require("../types/custom-type");
19
+ var CustomBoolean = /** @class */ (function (_super) {
20
+ __extends(CustomBoolean, _super);
21
+ function CustomBoolean(value) {
22
+ var _this = _super.call(this) || this;
23
+ _this.value = value;
24
+ return _this;
25
+ }
26
+ CustomBoolean.prototype.getType = function () {
27
+ return 'boolean';
28
+ };
29
+ CustomBoolean.prototype.valueOf = function () {
30
+ return this.value;
31
+ };
32
+ CustomBoolean.prototype.toString = function () {
33
+ return this.value.toString();
34
+ };
35
+ CustomBoolean.prototype.fork = function () {
36
+ return new CustomBoolean(this.value);
37
+ };
38
+ CustomBoolean.intrinsics = new Map();
39
+ return CustomBoolean;
40
+ }(custom_type_1.CustomLiteralType));
41
+ exports.default = CustomBoolean;
@@ -0,0 +1,25 @@
1
+ import { CustomLiteralType, CustomObjectType, Callable } from '../types/custom-type';
2
+ export declare class CustomListIterator implements Iterator<any> {
3
+ value: any[];
4
+ index: number;
5
+ constructor(value: any);
6
+ next(): IteratorResult<any>;
7
+ }
8
+ export default class CustomList extends CustomObjectType {
9
+ static intrinsics: Map<string, Function>;
10
+ value: any[];
11
+ static isNumber(value: string): boolean;
12
+ constructor(value: any[]);
13
+ [Symbol.iterator](): CustomListIterator;
14
+ concat(list: CustomList): CustomList;
15
+ slice: (a: CustomLiteralType, b: CustomLiteralType) => CustomList;
16
+ toIndex(value: string): number;
17
+ set(path: any[], value: any): Promise<void>;
18
+ get(path: any[]): Promise<any>;
19
+ getCallable(path: any[]): Promise<Callable>;
20
+ callMethod(method: string[], ...args: any[]): any;
21
+ getType(): string;
22
+ valueOf(): CustomList | null;
23
+ toString(): string;
24
+ fork(): CustomList;
25
+ }