brighterscript 0.67.6 → 0.67.7

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 (68) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/astUtils/reflection.d.ts +5 -2
  3. package/dist/astUtils/reflection.js +17 -2
  4. package/dist/astUtils/reflection.js.map +1 -1
  5. package/dist/astUtils/visitors.js +1 -1
  6. package/dist/astUtils/visitors.js.map +1 -1
  7. package/dist/parser/AstNode.d.ts +12 -1
  8. package/dist/parser/AstNode.js +20 -0
  9. package/dist/parser/AstNode.js.map +1 -1
  10. package/dist/parser/AstNode.spec.js +1266 -0
  11. package/dist/parser/AstNode.spec.js.map +1 -1
  12. package/dist/parser/Expression.d.ts +27 -0
  13. package/dist/parser/Expression.js +131 -11
  14. package/dist/parser/Expression.js.map +1 -1
  15. package/dist/parser/Statement.d.ts +40 -1
  16. package/dist/parser/Statement.js +227 -6
  17. package/dist/parser/Statement.js.map +1 -1
  18. package/dist/parser/Statement.spec.js.map +1 -1
  19. package/dist/types/ArrayType.d.ts +1 -0
  20. package/dist/types/ArrayType.js +4 -0
  21. package/dist/types/ArrayType.js.map +1 -1
  22. package/dist/types/BooleanType.d.ts +1 -0
  23. package/dist/types/BooleanType.js +3 -0
  24. package/dist/types/BooleanType.js.map +1 -1
  25. package/dist/types/BscType.d.ts +1 -0
  26. package/dist/types/CustomType.d.ts +1 -0
  27. package/dist/types/CustomType.js +3 -0
  28. package/dist/types/CustomType.js.map +1 -1
  29. package/dist/types/DoubleType.d.ts +1 -0
  30. package/dist/types/DoubleType.js +3 -0
  31. package/dist/types/DoubleType.js.map +1 -1
  32. package/dist/types/DynamicType.d.ts +1 -0
  33. package/dist/types/DynamicType.js +3 -0
  34. package/dist/types/DynamicType.js.map +1 -1
  35. package/dist/types/FloatType.d.ts +1 -0
  36. package/dist/types/FloatType.js +3 -0
  37. package/dist/types/FloatType.js.map +1 -1
  38. package/dist/types/FunctionType.d.ts +1 -0
  39. package/dist/types/FunctionType.js +10 -0
  40. package/dist/types/FunctionType.js.map +1 -1
  41. package/dist/types/IntegerType.d.ts +1 -0
  42. package/dist/types/IntegerType.js +3 -0
  43. package/dist/types/IntegerType.js.map +1 -1
  44. package/dist/types/InterfaceType.d.ts +1 -0
  45. package/dist/types/InterfaceType.js +9 -0
  46. package/dist/types/InterfaceType.js.map +1 -1
  47. package/dist/types/InvalidType.d.ts +1 -0
  48. package/dist/types/InvalidType.js +3 -0
  49. package/dist/types/InvalidType.js.map +1 -1
  50. package/dist/types/LongIntegerType.d.ts +1 -0
  51. package/dist/types/LongIntegerType.js +3 -0
  52. package/dist/types/LongIntegerType.js.map +1 -1
  53. package/dist/types/ObjectType.d.ts +1 -0
  54. package/dist/types/ObjectType.js +3 -0
  55. package/dist/types/ObjectType.js.map +1 -1
  56. package/dist/types/StringType.d.ts +1 -0
  57. package/dist/types/StringType.js +3 -0
  58. package/dist/types/StringType.js.map +1 -1
  59. package/dist/types/UninitializedType.d.ts +1 -0
  60. package/dist/types/UninitializedType.js +3 -0
  61. package/dist/types/UninitializedType.js.map +1 -1
  62. package/dist/types/VoidType.d.ts +1 -0
  63. package/dist/types/VoidType.js +3 -0
  64. package/dist/types/VoidType.js.map +1 -1
  65. package/dist/util.d.ts +8 -0
  66. package/dist/util.js +33 -0
  67. package/dist/util.js.map +1 -1
  68. package/package.json +2 -2
@@ -8,6 +8,7 @@ const testHelpers_spec_1 = require("../testHelpers.spec");
8
8
  const testHelpers_spec_2 = require("../testHelpers.spec");
9
9
  const reflection_1 = require("../astUtils/reflection");
10
10
  const Statement_1 = require("./Statement");
11
+ const Parser_1 = require("./Parser");
11
12
  describe('AstNode', () => {
12
13
  let program;
13
14
  beforeEach(() => {
@@ -161,5 +162,1270 @@ describe('AstNode', () => {
161
162
  (0, chai_config_spec_1.expect)(count).to.eql(1);
162
163
  });
163
164
  });
165
+ describe('clone', () => {
166
+ function testClone(code) {
167
+ let originalOuter;
168
+ if (typeof code === 'string') {
169
+ const parser = Parser_1.Parser.parse(code, { mode: Parser_1.ParseMode.BrighterScript });
170
+ originalOuter = parser.ast;
171
+ (0, testHelpers_spec_1.expectZeroDiagnostics)(parser);
172
+ }
173
+ else {
174
+ originalOuter = code;
175
+ }
176
+ const cloneOuter = originalOuter.clone();
177
+ //ensure the clone is identical to the original
178
+ //compare them both ways to ensure no extra properties exist
179
+ ensureIdentical(originalOuter, cloneOuter);
180
+ ensureIdentical(cloneOuter, originalOuter);
181
+ function ensureIdentical(original, clone, ancestors = [], seenNodes = new Map()) {
182
+ var _a, _b, _c;
183
+ for (let key in original) {
184
+ let fullKey = [...ancestors, key].join('.');
185
+ const originalValue = original === null || original === void 0 ? void 0 : original[key];
186
+ const cloneValue = clone === null || clone === void 0 ? void 0 : clone[key];
187
+ let typeOfValue = typeof originalValue;
188
+ //skip these properties
189
+ if (['parent', 'symbolTable', 'range'].includes(key) ||
190
+ //this is a circular reference property or the `returnType` prop, skip it
191
+ ((0, reflection_1.isFunctionExpression)(original) && (key === 'functionStatement' || key === 'returnType')) ||
192
+ //circular reference property for annotations
193
+ ((0, reflection_1.isAnnotationExpression)(original) && key === 'call')) {
194
+ continue;
195
+ }
196
+ //if this is an object, recurse
197
+ if (typeOfValue === 'object' && originalValue !== null) {
198
+ //skip circular references (but give some tollerance)
199
+ if (seenNodes.get(originalValue) > 2) {
200
+ throw new Error(`${fullKey} is a circular reference`);
201
+ }
202
+ seenNodes.set(originalValue, ((_a = seenNodes.get(originalValue)) !== null && _a !== void 0 ? _a : 0) + 1);
203
+ //object references should not be the same
204
+ if (originalValue === cloneValue) {
205
+ throw new Error(`${fullKey} is the same object reference`);
206
+ }
207
+ //compare child object values
208
+ ensureIdentical(originalValue, cloneValue, [...ancestors, key], seenNodes);
209
+ //for these tests, empty arrays can be the same as undefined so skip
210
+ }
211
+ else if ((Array.isArray(originalValue) && originalValue.length === 0 && cloneValue === undefined) ||
212
+ (Array.isArray(cloneValue) && cloneValue.length === 0 && originalValue === undefined)) {
213
+ continue;
214
+ //these values must be identical
215
+ }
216
+ else {
217
+ // eslint-disable-next-line no-useless-catch
218
+ try {
219
+ (0, chai_config_spec_1.expect)(cloneValue).to.equal(originalValue, `'${fullKey}' should be identical`);
220
+ }
221
+ catch (e) {
222
+ //build a full list of ancestors for orig and clone
223
+ let originalChain = [originalOuter];
224
+ let cloneChain = [cloneOuter];
225
+ for (let key of fullKey.split('.')) {
226
+ originalChain.push((_b = originalChain[originalChain.length - 1]) === null || _b === void 0 ? void 0 : _b[key]);
227
+ cloneChain.push((_c = cloneChain[cloneChain.length - 1]) === null || _c === void 0 ? void 0 : _c[key]);
228
+ }
229
+ console.error(e === null || e === void 0 ? void 0 : e.message, fullKey, originalChain, cloneChain);
230
+ throw e;
231
+ }
232
+ }
233
+ }
234
+ }
235
+ }
236
+ it('clones EmptyStatement', () => {
237
+ testClone(new Statement_1.EmptyStatement(util_1.util.createRange(1, 2, 3, 4)));
238
+ });
239
+ it('clones body with undefined statements array', () => {
240
+ const original = Parser_1.Parser.parse(`
241
+ sub main()
242
+ end sub
243
+ `).ast;
244
+ original.statements = undefined;
245
+ testClone(original);
246
+ });
247
+ it('clones body with undefined in the statements array', () => {
248
+ const original = Parser_1.Parser.parse(`
249
+ sub main()
250
+ end sub
251
+ `).ast;
252
+ original.statements.push(undefined);
253
+ testClone(original);
254
+ });
255
+ it('clones interfaces', () => {
256
+ testClone(`
257
+ interface Empty
258
+ end interface
259
+ interface Movie
260
+ name as string
261
+ previous as Movie
262
+ sub play()
263
+ function play2(a, b as string) as dynamic
264
+ end interface
265
+ interface Short extends Movie
266
+ length as integer
267
+ end interface
268
+ `);
269
+ });
270
+ it('handles when interfaces are missing their body', () => {
271
+ const original = Parser_1.Parser.parse(`
272
+ interface Empty
273
+ end interface
274
+ `).ast;
275
+ original.findChild(reflection_1.isInterfaceStatement).body = undefined;
276
+ testClone(original);
277
+ });
278
+ it('handles when interfaces have undefined statements in the body', () => {
279
+ const original = Parser_1.Parser.parse(`
280
+ interface Empty
281
+ end interface
282
+ `).ast;
283
+ original.findChild(reflection_1.isInterfaceStatement).body.push(undefined);
284
+ testClone(original);
285
+ });
286
+ it('handles when interfaces have undefined field type', () => {
287
+ const original = Parser_1.Parser.parse(`
288
+ interface Empty
289
+ name as string
290
+ end interface
291
+ `).ast;
292
+ original.findChild(reflection_1.isInterfaceFieldStatement).type = undefined;
293
+ testClone(original);
294
+ });
295
+ it('handles when interface function has undefined param and return type', () => {
296
+ const original = Parser_1.Parser.parse(`
297
+ interface Empty
298
+ function test() as dynamic
299
+ end interface
300
+ `).ast;
301
+ original.findChild(reflection_1.isInterfaceMethodStatement).params.push(undefined);
302
+ original.findChild(reflection_1.isInterfaceMethodStatement).returnType = undefined;
303
+ testClone(original);
304
+ });
305
+ it('handles when interface function has undefined params array', () => {
306
+ const original = Parser_1.Parser.parse(`
307
+ interface Empty
308
+ function test(a) as dynamic
309
+ end interface
310
+ `).ast;
311
+ original.findChild(reflection_1.isInterfaceMethodStatement).params = undefined;
312
+ testClone(original);
313
+ });
314
+ it('clones empty class', () => {
315
+ testClone(`
316
+ class Movie
317
+ end class
318
+ `);
319
+ });
320
+ it('clones class with undefined body', () => {
321
+ const original = Parser_1.Parser.parse(`
322
+ class Movie
323
+ end class
324
+ `).ast;
325
+ original.findChild(reflection_1.isClassStatement).body = undefined;
326
+ testClone(original);
327
+ });
328
+ it('clones class with undefined body statement', () => {
329
+ const original = Parser_1.Parser.parse(`
330
+ class Movie
331
+ end class
332
+ `).ast;
333
+ original.findChild(reflection_1.isClassStatement).body.push(undefined);
334
+ testClone(original);
335
+ });
336
+ it('clones class having parent class', () => {
337
+ testClone(`
338
+ class Video
339
+ end class
340
+ class Movie extends Video
341
+ end class
342
+ `);
343
+ });
344
+ it('clones class', () => {
345
+ testClone(`
346
+ class Movie
347
+ name as string
348
+ previous as Movie
349
+ sub play()
350
+ end sub
351
+ function play2(a, b as string) as dynamic
352
+ end function
353
+ end class
354
+ `);
355
+ });
356
+ it('clones access modifiers', () => {
357
+ testClone(`
358
+ class Movie
359
+ public sub test()
360
+ end sub
361
+ protected name = "bob"
362
+ private child = {}
363
+ end class
364
+ `);
365
+ });
366
+ it('clones AssignmentStatement', () => {
367
+ testClone(`
368
+ sub main()
369
+ thing = true
370
+ end sub
371
+ `);
372
+ });
373
+ it('clones AssignmentStatement with missing value', () => {
374
+ const original = Parser_1.Parser.parse(`
375
+ sub main()
376
+ thing = true
377
+ end sub
378
+ `).ast;
379
+ original.findChild(reflection_1.isAssignmentStatement).value = undefined;
380
+ testClone(original);
381
+ });
382
+ it('clones Block with undefined statements array', () => {
383
+ const original = Parser_1.Parser.parse(`
384
+ sub main()
385
+ thing = true
386
+ end sub
387
+ `).ast;
388
+ original.findChild(reflection_1.isBlock).statements = undefined;
389
+ testClone(original);
390
+ });
391
+ it('clones Block with undefined statement in statements array', () => {
392
+ const original = Parser_1.Parser.parse(`
393
+ sub main()
394
+ thing = true
395
+ end sub
396
+ `).ast;
397
+ original.findChild(reflection_1.isBlock).statements.push(undefined);
398
+ testClone(original);
399
+ });
400
+ it('clones comment statement with undefined comments array', () => {
401
+ const original = Parser_1.Parser.parse(`
402
+ 'hello world
403
+ `).ast;
404
+ original.findChild(reflection_1.isCommentStatement).comments = undefined;
405
+ testClone(original);
406
+ });
407
+ it('clones class with undefined method modifiers array', () => {
408
+ const original = Parser_1.Parser.parse(`
409
+ class Movie
410
+ sub test()
411
+ end sub
412
+ end class
413
+ `).ast;
414
+ original.findChild(reflection_1.isMethodStatement).modifiers = undefined;
415
+ testClone(original);
416
+ });
417
+ it('clones class with undefined func', () => {
418
+ const original = Parser_1.Parser.parse(`
419
+ class Movie
420
+ sub test()
421
+ end sub
422
+ end class
423
+ `).ast;
424
+ original.findChild(reflection_1.isMethodStatement).func = undefined;
425
+ testClone(original);
426
+ });
427
+ it('clones ExpressionStatement', () => {
428
+ testClone(`
429
+ sub main()
430
+ test()
431
+ end sub
432
+ `);
433
+ });
434
+ it('clones ExpressionStatement without an expression', () => {
435
+ const original = Parser_1.Parser.parse(`
436
+ sub main()
437
+ test()
438
+ end sub
439
+ `).ast;
440
+ original.findChild(reflection_1.isExpressionStatement).expression = undefined;
441
+ original.findChild(reflection_1.isFunctionExpression).callExpressions = [];
442
+ testClone(original);
443
+ });
444
+ it('clones IfStatement', () => {
445
+ testClone(`
446
+ sub main()
447
+ if true
448
+ end if
449
+ if true then
450
+ end if
451
+ if true
452
+ print 1
453
+ else if true
454
+ print 1
455
+ else
456
+ print 1
457
+ end if
458
+ end sub
459
+ `);
460
+ });
461
+ it('clones IfStatement without condition or branches', () => {
462
+ const original = Parser_1.Parser.parse(`
463
+ sub main()
464
+ if true
465
+ end if
466
+ end sub
467
+ `).ast;
468
+ original.findChild(reflection_1.isIfStatement).condition = undefined;
469
+ original.findChild(reflection_1.isIfStatement).thenBranch = undefined;
470
+ original.findChild(reflection_1.isIfStatement).elseBranch = undefined;
471
+ testClone(original);
472
+ });
473
+ it('clones IncrementStatement', () => {
474
+ testClone(`
475
+ sub main()
476
+ i = 0
477
+ i++
478
+ end sub
479
+ `);
480
+ });
481
+ it('clones IncrementStatement with missing `value`', () => {
482
+ const original = Parser_1.Parser.parse(`
483
+ sub main()
484
+ i = 0
485
+ i++
486
+ end sub
487
+ `).ast;
488
+ original.findChild(reflection_1.isIncrementStatement).value = undefined;
489
+ testClone(original);
490
+ });
491
+ it('clones PrintStatement with undefined expressions array', () => {
492
+ const original = Parser_1.Parser.parse(`
493
+ sub main()
494
+ print 1
495
+ end sub
496
+ `).ast;
497
+ original.findChild(reflection_1.isPrintStatement).expressions = undefined;
498
+ testClone(original);
499
+ });
500
+ it('clones PrintStatement with undefined expression in the expressions array', () => {
501
+ const original = Parser_1.Parser.parse(`
502
+ sub main()
503
+ print 1
504
+ end sub
505
+ `).ast;
506
+ original.findChild(reflection_1.isPrintStatement).expressions.push(undefined);
507
+ testClone(original);
508
+ });
509
+ it('clones DimStatement', () => {
510
+ testClone(`
511
+ sub main()
512
+ dim alpha[1,2]
513
+ end sub
514
+ `);
515
+ });
516
+ it('clones DimStatement with undefined dimensions', () => {
517
+ const original = Parser_1.Parser.parse(`
518
+ sub main()
519
+ dim alpha[1,2]
520
+ end sub
521
+ `).ast;
522
+ original.findChild(reflection_1.isDimStatement).dimensions = undefined;
523
+ testClone(original);
524
+ });
525
+ it('clones DimStatement with undefined as item in dimensions', () => {
526
+ const original = Parser_1.Parser.parse(`
527
+ sub main()
528
+ dim alpha[1,2]
529
+ end sub
530
+ `).ast;
531
+ original.findChild(reflection_1.isDimStatement).dimensions.push(undefined);
532
+ testClone(original);
533
+ });
534
+ it('clones Goto statement', () => {
535
+ testClone(`
536
+ sub main()
537
+ label1:
538
+ for i = 0 to 10
539
+ goto label1
540
+ end for
541
+ end sub
542
+ `);
543
+ });
544
+ it('clones return statement', () => {
545
+ testClone(`
546
+ sub main()
547
+ return
548
+ end sub
549
+ `);
550
+ });
551
+ it('clones return statement with value', () => {
552
+ testClone(`
553
+ function test()
554
+ return true
555
+ end function
556
+ `);
557
+ });
558
+ it('clones return statement with undefined value expression', () => {
559
+ const original = Parser_1.Parser.parse(`
560
+ function test()
561
+ return true
562
+ end function
563
+ `).ast;
564
+ original.findChild(reflection_1.isReturnStatement).value = undefined;
565
+ testClone(original);
566
+ });
567
+ it('clones stop statement', () => {
568
+ testClone(`
569
+ sub main()
570
+ stop
571
+ end sub
572
+ `);
573
+ });
574
+ it('clones ForStatement', () => {
575
+ testClone(`
576
+ function test()
577
+ for i = 0 to 10 step 2
578
+ end for
579
+ end function
580
+ `);
581
+ });
582
+ it('clones ForStatement with undefined items', () => {
583
+ const original = Parser_1.Parser.parse(`
584
+ function test()
585
+ for i = 0 to 10 step 2
586
+ end for
587
+ end function
588
+ `).ast;
589
+ original.findChild(reflection_1.isForStatement).counterDeclaration = undefined;
590
+ original.findChild(reflection_1.isForStatement).finalValue = undefined;
591
+ original.findChild(reflection_1.isForStatement).body = undefined;
592
+ original.findChild(reflection_1.isForStatement).increment = undefined;
593
+ testClone(original);
594
+ });
595
+ it('clones ForEachStatement', () => {
596
+ testClone(`
597
+ function test()
598
+ for each item in [1, 2, 3]
599
+ end for
600
+ end function
601
+ `);
602
+ });
603
+ it('clones ForEachStatement with undefined props', () => {
604
+ const original = Parser_1.Parser.parse(`
605
+ function test()
606
+ for each item in [1, 2, 3]
607
+ end for
608
+ end function
609
+ `).ast;
610
+ original.findChild(reflection_1.isForEachStatement).target = undefined;
611
+ original.findChild(reflection_1.isForEachStatement).body = undefined;
612
+ testClone(original);
613
+ });
614
+ it('clones EndStatement', () => {
615
+ testClone(`
616
+ function test()
617
+ end
618
+ end function
619
+ `);
620
+ });
621
+ it('clones ExitFor statement', () => {
622
+ testClone(`
623
+ sub main()
624
+ for i = 0 to 10
625
+ exit for
626
+ end for
627
+ end sub
628
+ `);
629
+ });
630
+ it('clones While statement', () => {
631
+ testClone(`
632
+ sub main()
633
+ while true
634
+ end while
635
+ end sub
636
+ `);
637
+ });
638
+ it('clones While statement', () => {
639
+ testClone(`
640
+ sub main()
641
+ while true
642
+ end while
643
+ end sub
644
+ `);
645
+ });
646
+ it('clones ExitWhile statement', () => {
647
+ testClone(`
648
+ sub main()
649
+ while true
650
+ exit while
651
+ end while
652
+ end sub
653
+ `);
654
+ });
655
+ it('clones tryCatch statement', () => {
656
+ testClone(`
657
+ sub main()
658
+ try
659
+ catch e
660
+ end try
661
+ end sub
662
+ `);
663
+ });
664
+ it('clones tryCatch statement when missing branches', () => {
665
+ const original = Parser_1.Parser.parse(`
666
+ sub main()
667
+ try
668
+ print 1
669
+ catch e
670
+ print 2
671
+ end try
672
+ end sub
673
+ `).ast;
674
+ original.findChild(reflection_1.isTryCatchStatement).tryBranch = undefined;
675
+ original.findChild(reflection_1.isTryCatchStatement).catchStatement = undefined;
676
+ testClone(original);
677
+ });
678
+ it('clones tryCatch statement when missing catch branch', () => {
679
+ const original = Parser_1.Parser.parse(`
680
+ sub main()
681
+ try
682
+ print 1
683
+ catch e
684
+ print 2
685
+ end try
686
+ end sub
687
+ `).ast;
688
+ original.findChild(reflection_1.isCatchStatement).catchBranch = undefined;
689
+ testClone(original);
690
+ });
691
+ it('clones throw statement', () => {
692
+ testClone(`
693
+ sub main()
694
+ throw "Crash"
695
+ end sub
696
+ `);
697
+ });
698
+ it('clones throw statement with missing expression', () => {
699
+ const original = Parser_1.Parser.parse(`
700
+ sub main()
701
+ throw "Crash"
702
+ end sub
703
+ `).ast;
704
+ original.findChild(reflection_1.isThrowStatement).expression = undefined;
705
+ testClone(original);
706
+ });
707
+ it('clones FunctionStatement when missing .func', () => {
708
+ const original = Parser_1.Parser.parse(`
709
+ sub main()
710
+ end sub
711
+ `).ast;
712
+ original.findChild(reflection_1.isFunctionStatement).func = undefined;
713
+ testClone(original);
714
+ });
715
+ it('clones empty enum statement', () => {
716
+ testClone(`
717
+ enum Direction
718
+ end enum
719
+ `);
720
+ });
721
+ it('clones enum statement with comments', () => {
722
+ testClone(`
723
+ enum Direction
724
+ 'the up direction
725
+ up = "up"
726
+ end enum
727
+ `);
728
+ });
729
+ it('clones enum statement with missing body', () => {
730
+ const original = Parser_1.Parser.parse(`
731
+ enum Direction
732
+ 'the up direction
733
+ up = "up"
734
+ end enum
735
+ `).ast;
736
+ original.findChild(reflection_1.isEnumStatement).body = undefined;
737
+ testClone(original);
738
+ });
739
+ it('clones enum statement with undefined in body', () => {
740
+ const original = Parser_1.Parser.parse(`
741
+ enum Direction
742
+ 'the up direction
743
+ up = "up"
744
+ end enum
745
+ `).ast;
746
+ original.findChild(reflection_1.isEnumStatement).body.push(undefined);
747
+ testClone(original);
748
+ });
749
+ it('clones enum member with missing value', () => {
750
+ const original = Parser_1.Parser.parse(`
751
+ enum Direction
752
+ up = "up"
753
+ end enum
754
+ `).ast;
755
+ original.findChild(reflection_1.isEnumMemberStatement).value = undefined;
756
+ testClone(original);
757
+ });
758
+ it('clones const', () => {
759
+ const original = Parser_1.Parser.parse(`
760
+ const key = "KEY"
761
+ `).ast;
762
+ testClone(original);
763
+ });
764
+ it('clones const with missing value', () => {
765
+ const original = Parser_1.Parser.parse(`
766
+ const key = "KEY"
767
+ `).ast;
768
+ original.findChild(reflection_1.isConstStatement).value = undefined;
769
+ testClone(original);
770
+ });
771
+ it('clones continue statement', () => {
772
+ testClone(`
773
+ sub main()
774
+ for i = 0 to 10
775
+ continue for
776
+ end for
777
+ end sub
778
+ `);
779
+ });
780
+ it('clones WhileStatement', () => {
781
+ const original = Parser_1.Parser.parse(`
782
+ sub main()
783
+ while true
784
+ print hello
785
+ end while
786
+ end sub
787
+ `).ast;
788
+ original.findChild(reflection_1.isWhileStatement).condition = undefined;
789
+ original.findChild(reflection_1.isWhileStatement).body = undefined;
790
+ testClone(original);
791
+ });
792
+ it('clones DottedSetStatement', () => {
793
+ const original = Parser_1.Parser.parse(`
794
+ sub main()
795
+ m.value = true
796
+ end sub
797
+ `).ast;
798
+ testClone(original);
799
+ });
800
+ it('clones DottedSetStatement with missing properties', () => {
801
+ const original = Parser_1.Parser.parse(`
802
+ sub main()
803
+ m.value = true
804
+ end sub
805
+ `).ast;
806
+ original.findChild(reflection_1.isDottedSetStatement).obj = undefined;
807
+ original.findChild(reflection_1.isDottedSetStatement).value = undefined;
808
+ testClone(original);
809
+ });
810
+ it('clones IndexedSetStatement with missing props', () => {
811
+ const original = Parser_1.Parser.parse(`
812
+ sub main()
813
+ m["value"] = true
814
+ end sub
815
+ `).ast;
816
+ original.findChild(reflection_1.isIndexedSetStatement).obj = undefined;
817
+ original.findChild(reflection_1.isIndexedSetStatement).value = undefined;
818
+ testClone(original);
819
+ });
820
+ it('clones IndexedSetStatement', () => {
821
+ const original = Parser_1.Parser.parse(`
822
+ sub main()
823
+ m["value"] = true
824
+ end sub
825
+ `).ast;
826
+ testClone(original);
827
+ });
828
+ it('clones IndexedSetStatement', () => {
829
+ const original = Parser_1.Parser.parse(`
830
+ sub main()
831
+ m["value"][2] = true
832
+ m["value", 2] = true
833
+ end sub
834
+ `).ast;
835
+ testClone(original);
836
+ });
837
+ it('clones IndexedSetStatement with undefined additional index', () => {
838
+ const original = Parser_1.Parser.parse(`
839
+ sub main()
840
+ m["value", 2] = true
841
+ end sub
842
+ `).ast;
843
+ original.findChild(reflection_1.isIndexedSetStatement).additionalIndexes[0] = undefined;
844
+ testClone(original);
845
+ });
846
+ it('clones IndexedSetStatement with missing props', () => {
847
+ const original = Parser_1.Parser.parse(`
848
+ sub main()
849
+ m["value"] = true
850
+ end sub
851
+ `).ast;
852
+ original.findChild(reflection_1.isIndexedSetStatement).index = undefined;
853
+ original.findChild(reflection_1.isIndexedSetStatement).additionalIndexes = undefined;
854
+ testClone(original);
855
+ });
856
+ it('clones LibraryStatement', () => {
857
+ const original = Parser_1.Parser.parse(`
858
+ Library "v30/bslCore.brs"
859
+ `).ast;
860
+ testClone(original);
861
+ });
862
+ it('clones LibraryStatement with missing tokens', () => {
863
+ const original = Parser_1.Parser.parse(`
864
+ Library "v30/bslCore.brs"
865
+ `).ast;
866
+ original.findChild(reflection_1.isLibraryStatement).tokens = undefined;
867
+ testClone(original);
868
+ });
869
+ it('clones NamespaceStatement', () => {
870
+ const original = Parser_1.Parser.parse(`
871
+ namespace Alpha
872
+ end namespace
873
+ `).ast;
874
+ testClone(original);
875
+ });
876
+ it('clones NamespaceStatement with missing items', () => {
877
+ const original = Parser_1.Parser.parse(`
878
+ namespace Alpha
879
+ end namespace
880
+ `).ast;
881
+ original.findChild(reflection_1.isNamespaceStatement).nameExpression = undefined;
882
+ original.findChild(reflection_1.isNamespaceStatement).body = undefined;
883
+ testClone(original);
884
+ });
885
+ it('clones ImportStatement', () => {
886
+ const original = Parser_1.Parser.parse(`
887
+ import "Something.brs"
888
+ `).ast;
889
+ testClone(original);
890
+ });
891
+ it('clones BinaryExpression', () => {
892
+ const original = Parser_1.Parser.parse(`
893
+ sub test()
894
+ print 1 + 2
895
+ end sub
896
+ `).ast;
897
+ testClone(original);
898
+ });
899
+ it('clones BinaryExpression with missing props', () => {
900
+ const original = Parser_1.Parser.parse(`
901
+ sub test()
902
+ print 1 + 2
903
+ end sub
904
+ `).ast;
905
+ original.findChild(reflection_1.isBinaryExpression).left = undefined;
906
+ original.findChild(reflection_1.isBinaryExpression).right = undefined;
907
+ testClone(original);
908
+ });
909
+ it('clones CallExpression', () => {
910
+ const original = Parser_1.Parser.parse(`
911
+ sub test()
912
+ test()
913
+ end sub
914
+ `).ast;
915
+ testClone(original);
916
+ });
917
+ it('clones CallExpression with args', () => {
918
+ const original = Parser_1.Parser.parse(`
919
+ sub test()
920
+ test(1,2,3)
921
+ end sub
922
+ `).ast;
923
+ testClone(original);
924
+ });
925
+ it('clones CallExpression with missing props', () => {
926
+ const original = Parser_1.Parser.parse(`
927
+ sub test()
928
+ test(1,2,3)
929
+ end sub
930
+ `).ast;
931
+ original.findChild(reflection_1.isCallExpression).callee = undefined;
932
+ original.findChild(reflection_1.isCallExpression).args = undefined;
933
+ testClone(original);
934
+ });
935
+ it('clones CallExpression with args containing undefined', () => {
936
+ const original = Parser_1.Parser.parse(`
937
+ sub test()
938
+ test(1,2,3)
939
+ end sub
940
+ `).ast;
941
+ original.findChild(reflection_1.isCallExpression).args[0] = undefined;
942
+ testClone(original);
943
+ });
944
+ it('clones FunctionExpression', () => {
945
+ const original = Parser_1.Parser.parse(`
946
+ sub test()
947
+ end sub
948
+ `).ast;
949
+ testClone(original);
950
+ });
951
+ it('clones FunctionExpression with undefined props', () => {
952
+ const original = Parser_1.Parser.parse(`
953
+ sub test()
954
+ end sub
955
+ `).ast;
956
+ original.findChild(reflection_1.isFunctionExpression).parameters = undefined;
957
+ original.findChild(reflection_1.isFunctionExpression).body = undefined;
958
+ testClone(original);
959
+ });
960
+ it('clones FunctionExpression with a parameter that is undefined', () => {
961
+ const original = Parser_1.Parser.parse(`
962
+ sub test(p1)
963
+ end sub
964
+ `).ast;
965
+ original.findChild(reflection_1.isFunctionExpression).parameters[0] = undefined;
966
+ testClone(original);
967
+ });
968
+ it('clones FunctionParameterExpression', () => {
969
+ const original = Parser_1.Parser.parse(`
970
+ sub test(p1)
971
+ end sub
972
+ `).ast;
973
+ testClone(original);
974
+ });
975
+ it('clones FunctionParameterExpression with default value', () => {
976
+ const original = Parser_1.Parser.parse(`
977
+ sub test(p1 = true)
978
+ end sub
979
+ `).ast;
980
+ testClone(original);
981
+ });
982
+ it('clones FunctionParameterExpression with undefined default value', () => {
983
+ const original = Parser_1.Parser.parse(`
984
+ sub test(p1 = true)
985
+ end sub
986
+ `).ast;
987
+ original.findChild(reflection_1.isFunctionExpression).parameters[0].defaultValue = undefined;
988
+ testClone(original);
989
+ });
990
+ it('clones NamespacedVariableNameExpression', () => {
991
+ const original = Parser_1.Parser.parse(`
992
+ sub test(p1 as Alpha.Beta)
993
+ end sub
994
+ `).ast;
995
+ testClone(original);
996
+ });
997
+ it('clones NamespacedVariableNameExpression with undefined expression', () => {
998
+ const original = Parser_1.Parser.parse(`
999
+ class Person extends Alpha.Humanoid
1000
+ end class
1001
+ `).ast;
1002
+ original.findChild(reflection_1.isClassStatement).parentClassName.expression = undefined;
1003
+ testClone(original);
1004
+ });
1005
+ it('clones DottedGetExpression', () => {
1006
+ const original = Parser_1.Parser.parse(`
1007
+ sub test()
1008
+ print alpha.beta.charlie
1009
+ end sub
1010
+ `).ast;
1011
+ testClone(original);
1012
+ });
1013
+ it('clones DottedGetExpression with undefined expression', () => {
1014
+ const original = Parser_1.Parser.parse(`
1015
+ sub test()
1016
+ print alpha.beta.charlie
1017
+ end sub
1018
+ `).ast;
1019
+ original.findChild(reflection_1.isDottedGetExpression).obj = undefined;
1020
+ testClone(original);
1021
+ });
1022
+ it('clones XmlAttributeGetExpression', () => {
1023
+ const original = Parser_1.Parser.parse(`
1024
+ sub test()
1025
+ print xml@name
1026
+ end sub
1027
+ `).ast;
1028
+ testClone(original);
1029
+ });
1030
+ it('clones XmlAttributeGetExpression with undefined expression', () => {
1031
+ const original = Parser_1.Parser.parse(`
1032
+ sub test()
1033
+ print xml@name
1034
+ end sub
1035
+ `).ast;
1036
+ original.findChild(reflection_1.isXmlAttributeGetExpression).obj = undefined;
1037
+ testClone(original);
1038
+ });
1039
+ it('clones IndexedGetExpression', () => {
1040
+ const original = Parser_1.Parser.parse(`
1041
+ sub test()
1042
+ print m.stuff[0]
1043
+ end sub
1044
+ `).ast;
1045
+ testClone(original);
1046
+ });
1047
+ it('clones IndexedGetExpression with undefined expression', () => {
1048
+ const original = Parser_1.Parser.parse(`
1049
+ sub test()
1050
+ print m.stuff[0]
1051
+ end sub
1052
+ `).ast;
1053
+ original.findChild(reflection_1.isIndexedGetExpression).obj = undefined;
1054
+ original.findChild(reflection_1.isIndexedGetExpression).index = undefined;
1055
+ original.findChild(reflection_1.isIndexedGetExpression).additionalIndexes = undefined;
1056
+ testClone(original);
1057
+ });
1058
+ it('clones IndexedGetExpression with additionalIndexes', () => {
1059
+ const original = Parser_1.Parser.parse(`
1060
+ sub test()
1061
+ print m.stuff[0, 1]
1062
+ end sub
1063
+ `).ast;
1064
+ testClone(original);
1065
+ });
1066
+ it('clones IndexedGetExpression with additionalIndexes having undefined', () => {
1067
+ const original = Parser_1.Parser.parse(`
1068
+ sub test()
1069
+ print m.stuff[0, 1]
1070
+ end sub
1071
+ `).ast;
1072
+ original.findChild(reflection_1.isIndexedGetExpression).additionalIndexes[0] = undefined;
1073
+ testClone(original);
1074
+ });
1075
+ it('clones GroupingExpression', () => {
1076
+ const original = Parser_1.Parser.parse(`
1077
+ sub test()
1078
+ print (1 + 2)
1079
+ end sub
1080
+ `).ast;
1081
+ testClone(original);
1082
+ });
1083
+ it('clones GroupingExpression with undefined expression', () => {
1084
+ const original = Parser_1.Parser.parse(`
1085
+ sub test()
1086
+ print (1 + 2)
1087
+ end sub
1088
+ `).ast;
1089
+ original.findChild(reflection_1.isGroupingExpression).expression = undefined;
1090
+ testClone(original);
1091
+ });
1092
+ it('clones LiteralExpression', () => {
1093
+ const original = Parser_1.Parser.parse(`
1094
+ sub test()
1095
+ print true
1096
+ end sub
1097
+ `).ast;
1098
+ testClone(original);
1099
+ });
1100
+ it('clones ExcapedCharCodeLiteralExpression', () => {
1101
+ const original = Parser_1.Parser.parse(`
1102
+ sub test()
1103
+ print \`\n\`
1104
+ end sub
1105
+ `).ast;
1106
+ testClone(original);
1107
+ });
1108
+ it('clones ArrayLiteralExpression', () => {
1109
+ const original = Parser_1.Parser.parse(`
1110
+ sub test()
1111
+ print []
1112
+ end sub
1113
+ `).ast;
1114
+ testClone(original);
1115
+ });
1116
+ it('clones ArrayLiteralExpression with undefined items', () => {
1117
+ const original = Parser_1.Parser.parse(`
1118
+ sub test()
1119
+ print []
1120
+ end sub
1121
+ `).ast;
1122
+ original.findChild(reflection_1.isArrayLiteralExpression).elements = undefined;
1123
+ testClone(original);
1124
+ });
1125
+ it('clones ArrayLiteralExpression with with elements having an undefined', () => {
1126
+ const original = Parser_1.Parser.parse(`
1127
+ sub test()
1128
+ print [1,2,3]
1129
+ end sub
1130
+ `).ast;
1131
+ original.findChild(reflection_1.isArrayLiteralExpression).elements[0] = undefined;
1132
+ testClone(original);
1133
+ });
1134
+ it('clones AAMemberExpression', () => {
1135
+ const original = Parser_1.Parser.parse(`
1136
+ sub test()
1137
+ movie = {
1138
+ duration: 20
1139
+ }
1140
+ end sub
1141
+ `).ast;
1142
+ testClone(original);
1143
+ });
1144
+ it('clones AAMemberExpression with undefined expression', () => {
1145
+ const original = Parser_1.Parser.parse(`
1146
+ sub test()
1147
+ movie = {
1148
+ duration: 20
1149
+ }
1150
+ end sub
1151
+ `).ast;
1152
+ original.findChild(reflection_1.isAAMemberExpression).value = undefined;
1153
+ testClone(original);
1154
+ });
1155
+ it('clones AALiteralExpression', () => {
1156
+ const original = Parser_1.Parser.parse(`
1157
+ sub test()
1158
+ movie = {
1159
+ duration: 20
1160
+ }
1161
+ end sub
1162
+ `).ast;
1163
+ testClone(original);
1164
+ });
1165
+ it('clones AALiteralExpression with undefined items', () => {
1166
+ const original = Parser_1.Parser.parse(`
1167
+ sub test()
1168
+ movie = {
1169
+ duration: 20
1170
+ }
1171
+ end sub
1172
+ `).ast;
1173
+ original.findChild(reflection_1.isAALiteralExpression).elements = undefined;
1174
+ testClone(original);
1175
+ });
1176
+ it('clones AALiteralExpression with undefined items', () => {
1177
+ const original = Parser_1.Parser.parse(`
1178
+ sub test()
1179
+ movie = {
1180
+ duration: 20
1181
+ }
1182
+ end sub
1183
+ `).ast;
1184
+ original.findChild(reflection_1.isAALiteralExpression).elements.push(undefined);
1185
+ testClone(original);
1186
+ });
1187
+ it('clones UnaryExpression', () => {
1188
+ const original = Parser_1.Parser.parse(`
1189
+ sub test()
1190
+ print not true
1191
+ end sub
1192
+ `).ast;
1193
+ testClone(original);
1194
+ });
1195
+ it('clones UnaryExpression with undefined expression', () => {
1196
+ const original = Parser_1.Parser.parse(`
1197
+ sub test()
1198
+ print not true
1199
+ end sub
1200
+ `).ast;
1201
+ original.findChild(reflection_1.isUnaryExpression).right = undefined;
1202
+ testClone(original);
1203
+ });
1204
+ it('clones SourceLiteralExpression', () => {
1205
+ const original = Parser_1.Parser.parse(`
1206
+ sub test()
1207
+ print LINE_NUM
1208
+ end sub
1209
+ `).ast;
1210
+ testClone(original);
1211
+ });
1212
+ it('clones NewExpression', () => {
1213
+ const original = Parser_1.Parser.parse(`
1214
+ sub test()
1215
+ print new Person()
1216
+ end sub
1217
+ `).ast;
1218
+ testClone(original);
1219
+ });
1220
+ it('clones NewExpression with undefined expression', () => {
1221
+ const original = Parser_1.Parser.parse(`
1222
+ sub test()
1223
+ print new Person()
1224
+ end sub
1225
+ `).ast;
1226
+ original.findChild(reflection_1.isNewExpression).call = undefined;
1227
+ testClone(original);
1228
+ });
1229
+ it('clones CallfuncExpression', () => {
1230
+ const original = Parser_1.Parser.parse(`
1231
+ sub test()
1232
+ print node@.run(1)
1233
+ end sub
1234
+ `).ast;
1235
+ testClone(original);
1236
+ });
1237
+ it('clones CallfuncExpression with undefined expression', () => {
1238
+ const original = Parser_1.Parser.parse(`
1239
+ sub test()
1240
+ print node@.run()
1241
+ end sub
1242
+ `).ast;
1243
+ original.findChild(reflection_1.isCallfuncExpression).callee = undefined;
1244
+ original.findChild(reflection_1.isCallfuncExpression).args = undefined;
1245
+ testClone(original);
1246
+ });
1247
+ it('clones CallfuncExpression with undefined args', () => {
1248
+ const original = Parser_1.Parser.parse(`
1249
+ sub test()
1250
+ print node@.run()
1251
+ end sub
1252
+ `).ast;
1253
+ original.findChild(reflection_1.isCallfuncExpression).args[0] = undefined;
1254
+ testClone(original);
1255
+ });
1256
+ it('clones TemplateStringQuasiExpression', () => {
1257
+ const original = Parser_1.Parser.parse(`
1258
+ sub test()
1259
+ print \`hello \${name}\`
1260
+ end sub
1261
+ `).ast;
1262
+ testClone(original);
1263
+ });
1264
+ it('clones TemplateStringQuasiExpression with undefined expressions', () => {
1265
+ const original = Parser_1.Parser.parse(`
1266
+ sub test()
1267
+ print \`hello \${name}\`
1268
+ end sub
1269
+ `).ast;
1270
+ original.findChild(reflection_1.isTemplateStringQuasiExpression).expressions = undefined;
1271
+ testClone(original);
1272
+ });
1273
+ it('clones TemplateStringQuasiExpression with undefined expressions', () => {
1274
+ const original = Parser_1.Parser.parse(`
1275
+ sub test()
1276
+ print \`hello \${name}\`
1277
+ end sub
1278
+ `).ast;
1279
+ original.findChild(reflection_1.isTemplateStringQuasiExpression).expressions[0] = undefined;
1280
+ testClone(original);
1281
+ });
1282
+ it('clones TemplateStringExpression', () => {
1283
+ const original = Parser_1.Parser.parse(`
1284
+ sub test()
1285
+ print \`hello \${name} \\n\`
1286
+ end sub
1287
+ `).ast;
1288
+ testClone(original);
1289
+ });
1290
+ it('clones TemplateStringExpression with undefined expressions', () => {
1291
+ const original = Parser_1.Parser.parse(`
1292
+ sub test()
1293
+ print \`hello \${name}\`
1294
+ end sub
1295
+ `).ast;
1296
+ original.findChild(reflection_1.isTemplateStringExpression).quasis = undefined;
1297
+ original.findChild(reflection_1.isTemplateStringExpression).expressions = undefined;
1298
+ testClone(original);
1299
+ });
1300
+ it('clones TemplateStringExpression with undefined expressions', () => {
1301
+ const original = Parser_1.Parser.parse(`
1302
+ sub test()
1303
+ print \`hello \${name}\`
1304
+ end sub
1305
+ `).ast;
1306
+ original.findChild(reflection_1.isTemplateStringExpression).quasis.push(undefined);
1307
+ original.findChild(reflection_1.isTemplateStringExpression).expressions.push(undefined);
1308
+ testClone(original);
1309
+ });
1310
+ it('clones TemplateStringExpression', () => {
1311
+ const original = Parser_1.Parser.parse(`
1312
+ sub test()
1313
+ print tag\`hello \${name} \\n\`
1314
+ end sub
1315
+ `).ast;
1316
+ testClone(original);
1317
+ });
1318
+ it('clones TemplateStringExpression with undefined expressions', () => {
1319
+ const original = Parser_1.Parser.parse(`
1320
+ sub test()
1321
+ print tag\`hello \${name}\`
1322
+ end sub
1323
+ `).ast;
1324
+ original.findChild(reflection_1.isTaggedTemplateStringExpression).quasis = undefined;
1325
+ original.findChild(reflection_1.isTaggedTemplateStringExpression).expressions = undefined;
1326
+ testClone(original);
1327
+ });
1328
+ it('clones TemplateStringExpression with undefined expressions', () => {
1329
+ const original = Parser_1.Parser.parse(`
1330
+ sub test()
1331
+ print tag\`hello \${name}\`
1332
+ end sub
1333
+ `).ast;
1334
+ original.findChild(reflection_1.isTaggedTemplateStringExpression).quasis.push(undefined);
1335
+ original.findChild(reflection_1.isTaggedTemplateStringExpression).expressions.push(undefined);
1336
+ testClone(original);
1337
+ });
1338
+ it('clones TernaryExpression', () => {
1339
+ const original = Parser_1.Parser.parse(`
1340
+ sub test()
1341
+ print true ? 1 : 2
1342
+ end sub
1343
+ `).ast;
1344
+ testClone(original);
1345
+ });
1346
+ it('clones TernaryExpression with undefined expressions', () => {
1347
+ const original = Parser_1.Parser.parse(`
1348
+ sub test()
1349
+ print true ? 1 : 2
1350
+ end sub
1351
+ `).ast;
1352
+ original.findChild(reflection_1.isTernaryExpression).test = undefined;
1353
+ original.findChild(reflection_1.isTernaryExpression).consequent = undefined;
1354
+ original.findChild(reflection_1.isTernaryExpression).alternate = undefined;
1355
+ testClone(original);
1356
+ });
1357
+ it('clones NullCoalescingExpression', () => {
1358
+ const original = Parser_1.Parser.parse(`
1359
+ sub test()
1360
+ print a ?? b
1361
+ end sub
1362
+ `).ast;
1363
+ testClone(original);
1364
+ });
1365
+ it('clones NullCoalescingExpression with undefined expressions', () => {
1366
+ const original = Parser_1.Parser.parse(`
1367
+ sub test()
1368
+ print a ?? b
1369
+ end sub
1370
+ `).ast;
1371
+ original.findChild(reflection_1.isNullCoalescingExpression).consequent = undefined;
1372
+ original.findChild(reflection_1.isNullCoalescingExpression).alternate = undefined;
1373
+ testClone(original);
1374
+ });
1375
+ it('clones RegexLiteralExpression', () => {
1376
+ const original = Parser_1.Parser.parse(`
1377
+ sub test()
1378
+ print /test/gi
1379
+ end sub
1380
+ `).ast;
1381
+ testClone(original);
1382
+ });
1383
+ it('clones TypeCastExpression', () => {
1384
+ const original = Parser_1.Parser.parse(`
1385
+ sub test()
1386
+ print name as string
1387
+ end sub
1388
+ `).ast;
1389
+ testClone(original);
1390
+ });
1391
+ it('clones TypeCastExpression with undefined expression', () => {
1392
+ const original = Parser_1.Parser.parse(`
1393
+ sub test()
1394
+ print name as string
1395
+ end sub
1396
+ `).ast;
1397
+ original.findChild(reflection_1.isTypeCastExpression).obj = undefined;
1398
+ testClone(original);
1399
+ });
1400
+ it('clones AnnotationExpressions above every statement type', () => {
1401
+ const original = Parser_1.Parser.parse(`
1402
+ @annotation()
1403
+ sub test()
1404
+ @annotation()
1405
+ statement = true
1406
+ @annotation()
1407
+ call()
1408
+ @annotation()
1409
+ 'comment
1410
+ end sub
1411
+
1412
+ @annotation()
1413
+ class Person
1414
+ end class
1415
+
1416
+ @annotation()
1417
+ enum Direction
1418
+ end enum
1419
+
1420
+ @annotation()
1421
+ namespace alpha
1422
+ end namespace
1423
+
1424
+ @annotation()
1425
+ const thing = 1
1426
+ `).ast;
1427
+ testClone(original);
1428
+ });
1429
+ });
164
1430
  });
165
1431
  //# sourceMappingURL=AstNode.spec.js.map