autoit3-pegjs 4.0.0 → 4.1.1

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 (3) hide show
  1. package/dist/autoit3.d.ts +376 -21
  2. package/dist/autoit3.js +6673 -2153
  3. package/package.json +2 -2
package/dist/autoit3.d.ts CHANGED
@@ -228,8 +228,20 @@ type LineContinuation = [
228
228
  LineTerminatorSequence,
229
229
  ];
230
230
  type ConstDeclarationList = [ConstDeclaration, ...ConstDeclaration[]];
231
+ type ConstDeclarationListInWith = [
232
+ ConstDeclarationInWith,
233
+ ...ConstDeclarationInWith[],
234
+ ];
231
235
  type EnumDeclarationList = [EnumDeclaration, ...EnumDeclaration[]];
236
+ type EnumDeclarationListInWith = [
237
+ EnumDeclarationInWith,
238
+ ...EnumDeclarationInWith[],
239
+ ];
232
240
  type VariableDeclarationList = [VariableDeclaration, ...VariableDeclaration[]];
241
+ type VariableDeclarationListInWith = [
242
+ VariableDeclarationInWith,
243
+ ...VariableDeclarationInWith[],
244
+ ];
233
245
  type VariableDeclaration = {
234
246
  type: "VariableDeclarator";
235
247
  id: VariableIdentifier;
@@ -237,12 +249,25 @@ type VariableDeclaration = {
237
249
  init: Initialiser | null;
238
250
  location: LocationRange;
239
251
  };
252
+ type VariableDeclarationInWith = {
253
+ type: "VariableDeclarator";
254
+ id: VariableIdentifier;
255
+ dimensions: (ExpressionInWith | null)[];
256
+ init: InitialiserInWith | null;
257
+ location: LocationRange;
258
+ };
240
259
  type EnumDeclaration = {
241
260
  type: "VariableDeclarator";
242
261
  id: VariableIdentifier;
243
262
  init: AssignmentExpression | null;
244
263
  location: LocationRange;
245
264
  };
265
+ type EnumDeclarationInWith = {
266
+ type: "VariableDeclarator";
267
+ id: VariableIdentifier;
268
+ init: AssignmentExpressionInWith | null;
269
+ location: LocationRange;
270
+ };
246
271
  type ConstDeclaration = {
247
272
  type: "VariableDeclarator";
248
273
  id: VariableIdentifier;
@@ -250,7 +275,15 @@ type ConstDeclaration = {
250
275
  init: AssignmentExpression | ArrayDeclaration;
251
276
  location: LocationRange;
252
277
  };
278
+ type ConstDeclarationInWith = {
279
+ type: "VariableDeclarator";
280
+ id: VariableIdentifier;
281
+ dimensions: (ExpressionInWith | null)[];
282
+ init: AssignmentExpressionInWith | ArrayDeclarationInWith;
283
+ location: LocationRange;
284
+ };
253
285
  type Initialiser = AssignmentExpression | ArrayDeclaration;
286
+ type InitialiserInWith = AssignmentExpressionInWith | ArrayDeclarationInWith;
254
287
  type VariableIdentifier = {
255
288
  type: "VariableIdentifier";
256
289
  name: string;
@@ -287,10 +320,19 @@ type ArrayDeclaration = {
287
320
  elements: ArrayDeclarationElementList | null;
288
321
  location: LocationRange;
289
322
  };
323
+ type ArrayDeclarationInWith = {
324
+ type: "ArrayDeclaration";
325
+ elements: ArrayDeclarationElementListInWith | null;
326
+ location: LocationRange;
327
+ };
290
328
  type ArrayDeclarationElementList = [
291
329
  Expression | ArrayDeclaration,
292
330
  ...(Expression | ArrayDeclaration)[],
293
331
  ];
332
+ type ArrayDeclarationElementListInWith = [
333
+ ExpressionInWith | ArrayDeclarationInWith,
334
+ ...(ExpressionInWith | ArrayDeclarationInWith)[],
335
+ ];
294
336
  type Identifier = IdentifierName;
295
337
  type IdentifierName = {
296
338
  type: "Identifier";
@@ -348,7 +390,7 @@ type FutureReservedWord = "@RESERVED";
348
390
  type WithStatement = {
349
391
  type: "WithStatement";
350
392
  object: Expression;
351
- body: never[] | NonNullable<StatementList | null>;
393
+ body: never[] | NonNullable<StatementListInWith | null>;
352
394
  location: LocationRange;
353
395
  };
354
396
  type ReturnStatement = {
@@ -356,16 +398,31 @@ type ReturnStatement = {
356
398
  value: Expression | null;
357
399
  location: LocationRange;
358
400
  };
401
+ type ReturnStatementInWith = {
402
+ type: "ReturnStatement";
403
+ value: ExpressionInWith | null;
404
+ location: LocationRange;
405
+ };
359
406
  type ExitLoopStatement = {
360
407
  type: "ExitLoopStatement";
361
408
  level: Expression | null;
362
409
  location: LocationRange;
363
410
  };
411
+ type ExitLoopStatementInWith = {
412
+ type: "ExitLoopStatement";
413
+ level: ExpressionInWith | null;
414
+ location: LocationRange;
415
+ };
364
416
  type ContinueLoopStatement = {
365
417
  type: "ContinueLoopStatement";
366
418
  level: Expression | null;
367
419
  location: LocationRange;
368
420
  };
421
+ type ContinueLoopStatementInWith = {
422
+ type: "ContinueLoopStatement";
423
+ level: ExpressionInWith | null;
424
+ location: LocationRange;
425
+ };
369
426
  type ContinueCaseStatement = {
370
427
  type: "ContinueCaseStatement";
371
428
  location: LocationRange;
@@ -375,20 +432,42 @@ type SelectStatement = {
375
432
  cases: SelectCaseBlock;
376
433
  location: LocationRange;
377
434
  };
435
+ type SelectStatementInWith = {
436
+ type: "SelectStatement";
437
+ cases: SelectCaseBlockInWith;
438
+ location: LocationRange;
439
+ };
378
440
  type SelectCaseBlock =
379
441
  | (
380
442
  | DefaultClause
381
443
  | (never[] | NonNullable<SelectCaseClauses | null>)[number]
382
444
  | (never[] | NonNullable<SelectCaseClauses | null>)[number]
383
445
  )[]
384
- | (never[] | NonNullable<SelectCaseClauses | null>);
446
+ | SelectCaseClauses;
447
+ type SelectCaseBlockInWith =
448
+ | (
449
+ | DefaultClauseInWith
450
+ | (never[] | NonNullable<SelectCaseClausesInWith | null>)[number]
451
+ | (never[] | NonNullable<SelectCaseClausesInWith | null>)[number]
452
+ )[]
453
+ | SelectCaseClauses;
385
454
  type SelectCaseClauses = [SelectCaseClause, ...SelectCaseClause[]];
455
+ type SelectCaseClausesInWith = [
456
+ SelectCaseClauseInWith,
457
+ ...SelectCaseClauseInWith[],
458
+ ];
386
459
  type SelectCaseClause = {
387
460
  type: "SelectCase";
388
461
  tests: AssignmentExpression;
389
462
  consequent: never[] | NonNullable<StatementList | null>;
390
463
  location: LocationRange;
391
464
  };
465
+ type SelectCaseClauseInWith = {
466
+ type: "SelectCase";
467
+ tests: AssignmentExpressionInWith;
468
+ consequent: never[] | NonNullable<StatementListInWith | null>;
469
+ location: LocationRange;
470
+ };
392
471
  type BooleanLiteral =
393
472
  | { type: "Literal"; value: true; location: LocationRange }
394
473
  | { type: "Literal"; value: false; location: LocationRange };
@@ -457,6 +536,8 @@ type ExponentIndicator = string;
457
536
  type SignedInteger = [string | null, DecimalDigit[]];
458
537
  type MemberExpression =
459
538
  PrimaryExpression | ({type: "MemberExpression", object: MemberExpression|PrimaryExpression, location: LocationRange } & ({property: Expression, computed: true} | {property:IdentifierName, computed: false}));
539
+ type MemberExpressionInWith =
540
+ PrimaryExpression | ({type: "MemberExpression", object: MemberExpression|PrimaryExpression, location: LocationRange } & ({property: Expression, computed: true} | {property:IdentifierName, computed: false}));
460
541
  type DefaultKeyword = {
461
542
  type: "Keyword";
462
543
  value: "Default";
@@ -468,6 +549,12 @@ type PrimaryExpression =
468
549
  | Literal
469
550
  | ParenthesizedExpression
470
551
  | DefaultKeyword;
552
+ type PrimaryExpressionInWith =
553
+ | Identifier
554
+ | VariableIdentifier
555
+ | Literal
556
+ | ParenthesizedExpression
557
+ | DefaultKeyword;
471
558
  type ParenthesizedExpression = {
472
559
  type: "ParenthesizedExpression";
473
560
  expression: Expression;
@@ -475,9 +562,19 @@ type ParenthesizedExpression = {
475
562
  };
476
563
  type CallExpression =
477
564
  {type: "CallExpression", callee: MemberExpression | CallExpression, arguments: Arguments, location: LocationRange } | {type: "MemberExpression", object: MemberExpression | CallExpression, property: Expression | IdentifierName, computed: boolean, location: LocationRange };
565
+ type CallExpressionInWith =
566
+ {type: "CallExpression", callee: MemberExpression | CallExpression, arguments: Arguments, location: LocationRange } | {type: "MemberExpression", object: MemberExpression | CallExpression | null, property: Expression | IdentifierName, computed: boolean, location: LocationRange };
478
567
  type Arguments = never[] | NonNullable<ArgumentList | null>;
568
+ type ArgumentsInWith = never[] | NonNullable<ArgumentListInWith | null>;
479
569
  type ArgumentList = [AssignmentExpression, ...AssignmentExpression[]];
570
+ type ArgumentListInWith = [
571
+ AssignmentExpressionInWith,
572
+ ...AssignmentExpressionInWith[],
573
+ ];
480
574
  type LeftHandSideExpression = CallExpression | MemberExpression;
575
+ type LeftHandSideExpressionInWith =
576
+ | CallExpressionInWith
577
+ | MemberExpressionInWith;
481
578
  type AssignmentExpression =
482
579
  | {
483
580
  type: "AssignmentExpression";
@@ -494,6 +591,22 @@ type AssignmentExpression =
494
591
  location: LocationRange;
495
592
  }
496
593
  | ConditionalExpression;
594
+ type AssignmentExpressionInWith =
595
+ | {
596
+ type: "AssignmentExpression";
597
+ operator: "=";
598
+ left: LeftHandSideExpressionInWith;
599
+ right: AssignmentExpressionInWith;
600
+ location: LocationRange;
601
+ }
602
+ | {
603
+ type: "AssignmentExpression";
604
+ operator: AssignmentOperator;
605
+ left: LeftHandSideExpressionInWith;
606
+ right: AssignmentExpressionInWith;
607
+ location: LocationRange;
608
+ }
609
+ | ConditionalExpressionInWith;
497
610
  type AssignmentOperator = "*=" | "/=" | "+=" | "-=" | "&=";
498
611
  type ConditionalExpression =
499
612
  | {
@@ -504,6 +617,15 @@ type ConditionalExpression =
504
617
  location: LocationRange;
505
618
  }
506
619
  | LogicalORExpression;
620
+ type ConditionalExpressionInWith =
621
+ | {
622
+ type: "ConditionalExpression";
623
+ test: LogicalORExpressionInWith;
624
+ consequent: AssignmentExpressionInWith;
625
+ alternate: AssignmentExpressionInWith;
626
+ location: LocationRange;
627
+ }
628
+ | LogicalORExpressionInWith;
507
629
  type LogicalORExpression =
508
630
  | {
509
631
  type: "LogicalExpression";
@@ -513,6 +635,15 @@ type LogicalORExpression =
513
635
  location: LocationRange;
514
636
  }
515
637
  | LogicalANDExpression;
638
+ type LogicalORExpressionInWith =
639
+ | {
640
+ type: "LogicalExpression";
641
+ operator: LogicalOROperator;
642
+ left: LogicalANDExpressionInWith;
643
+ right: LogicalORExpressionInWith;
644
+ location: LocationRange;
645
+ }
646
+ | LogicalANDExpressionInWith;
516
647
  type LogicalANDExpression =
517
648
  | {
518
649
  type: "LogicalExpression";
@@ -522,6 +653,15 @@ type LogicalANDExpression =
522
653
  location: LocationRange;
523
654
  }
524
655
  | EqualityExpression;
656
+ type LogicalANDExpressionInWith =
657
+ | {
658
+ type: "LogicalExpression";
659
+ operator: LogicalANDOperator;
660
+ left: EqualityExpressionInWith;
661
+ right: LogicalANDExpressionInWith;
662
+ location: LocationRange;
663
+ }
664
+ | EqualityExpressionInWith;
525
665
  type LogicalOROperator = string;
526
666
  type LogicalANDOperator = string;
527
667
  type EqualityExpression =
@@ -533,6 +673,15 @@ type EqualityExpression =
533
673
  location: LocationRange;
534
674
  }
535
675
  | RelationalExpression;
676
+ type EqualityExpressionInWith =
677
+ | {
678
+ type: "BinaryExpression";
679
+ operator: EqualityOperator;
680
+ left: RelationalExpressionInWith;
681
+ right: EqualityExpressionInWith;
682
+ location: LocationRange;
683
+ }
684
+ | RelationalExpressionInWith;
536
685
  type EqualityOperator = "==" | "=";
537
686
  type RelationalExpression =
538
687
  | {
@@ -543,6 +692,15 @@ type RelationalExpression =
543
692
  location: LocationRange;
544
693
  }
545
694
  | AdditiveExpression;
695
+ type RelationalExpressionInWith =
696
+ | {
697
+ type: "BinaryExpression";
698
+ operator: RelationalOperator;
699
+ left: AdditiveExpressionInWith;
700
+ right: AdditiveExpressionInWith;
701
+ location: LocationRange;
702
+ }
703
+ | AdditiveExpressionInWith;
546
704
  type AdditiveExpression =
547
705
  | {
548
706
  type: "BinaryExpression";
@@ -552,6 +710,15 @@ type AdditiveExpression =
552
710
  location: LocationRange;
553
711
  }
554
712
  | MultiplicativeExpression;
713
+ type AdditiveExpressionInWith =
714
+ | {
715
+ type: "BinaryExpression";
716
+ operator: AdditiveOperator;
717
+ left: MultiplicativeExpressionInWith;
718
+ right: AdditiveExpressionInWith;
719
+ location: LocationRange;
720
+ }
721
+ | MultiplicativeExpressionInWith;
555
722
  type AdditiveOperator = "+" | "-" | "&";
556
723
  type RelationalOperator = "<=" | ">=" | "<>" | "<" | ">";
557
724
  type MultiplicativeExpression =
@@ -563,20 +730,35 @@ type MultiplicativeExpression =
563
730
  location: LocationRange;
564
731
  }
565
732
  | ExponentialExpression;
733
+ type MultiplicativeExpressionInWith =
734
+ | {
735
+ type: "BinaryExpression";
736
+ operator: MultiplicativeOperator;
737
+ left: ExponentialExpressionInWith;
738
+ right: MultiplicativeExpressionInWith;
739
+ location: LocationRange;
740
+ }
741
+ | ExponentialExpressionInWith;
566
742
  type MultiplicativeOperator = "*" | "/";
567
743
  type ExponentialExpression =
568
744
  | {
569
745
  type: "BinaryExpression";
570
746
  operator: ExponentialOperator;
571
- left: NotExpression;
747
+ left: UnaryExpression;
572
748
  right: ExponentialExpression;
573
749
  location: LocationRange;
574
750
  }
575
- | NotExpression;
576
- type ExponentialOperator = "^";
577
- type NotExpression =
578
- | { type: "NotExpression"; value: UnaryExpression; location: LocationRange }
579
751
  | UnaryExpression;
752
+ type ExponentialExpressionInWith =
753
+ | {
754
+ type: "BinaryExpression";
755
+ operator: ExponentialOperator;
756
+ left: UnaryExpressionInWith;
757
+ right: ExponentialExpressionInWith;
758
+ location: LocationRange;
759
+ }
760
+ | UnaryExpressionInWith;
761
+ type ExponentialOperator = "^";
580
762
  type UnaryExpression =
581
763
  | LeftHandSideExpression
582
764
  | {
@@ -586,12 +768,17 @@ type UnaryExpression =
586
768
  prefix: true;
587
769
  location: LocationRange;
588
770
  };
589
- type UnaryOperator = string;
590
- type Program = {
591
- type: "Program";
592
- body: never[] | NonNullable<SourceElements | null>;
593
- };
594
- type SourceElements = [SourceElement, ...SourceElement[]];
771
+ type UnaryExpressionInWith =
772
+ | LeftHandSideExpressionInWith
773
+ | {
774
+ type: "UnaryExpression";
775
+ operator: UnaryOperator;
776
+ argument: UnaryExpressionInWith;
777
+ prefix: true;
778
+ location: LocationRange;
779
+ };
780
+ type UnaryOperator = string | NotToken;
781
+ type Program = { type: "Program"; body: SourceElement[] };
595
782
  type SourceElement = Statement | FunctionDeclaration;
596
783
  type PreProcStatement = PreProc;
597
784
  type FunctionDeclaration = {
@@ -609,20 +796,20 @@ type FormalParameter =
609
796
  const: boolean;
610
797
  byref: true;
611
798
  id: VariableIdentifier;
612
- init: Expression | null;
799
+ init: null;
613
800
  location: LocationRange;
614
801
  }
615
802
  | {
616
803
  type: "Parameter";
617
- byref: boolean;
804
+ byref: true;
618
805
  const: true;
619
806
  id: VariableIdentifier;
620
- init: Expression | null;
807
+ init: null;
621
808
  location: LocationRange;
622
809
  }
623
810
  | {
624
811
  type: "Parameter";
625
- const: false;
812
+ const: boolean;
626
813
  byref: false;
627
814
  id: VariableIdentifier;
628
815
  init: Expression | null;
@@ -645,8 +832,26 @@ type Statement =
645
832
  | PreProcStatement
646
833
  | MultiLineComment
647
834
  | SelectStatement;
835
+ type StatementInWith =
836
+ | VariableStatementInWith
837
+ | EmptyStatement
838
+ | SingleLineComment
839
+ | ExpressionStatementInWIth
840
+ | IfStatementInWith
841
+ | IterationStatementInWith
842
+ | ContinueLoopStatementInWith
843
+ | ContinueCaseStatement
844
+ | ExitLoopStatementInWith
845
+ | ReturnStatementInWith
846
+ | WithStatement
847
+ | SwitchStatementInWith
848
+ | ExitStatementInWIth
849
+ | PreProcStatement
850
+ | MultiLineComment
851
+ | SelectStatementInWith;
648
852
  type EmptyStatement = { type: "EmptyStatement"; location: LocationRange };
649
853
  type StatementList = [Statement, ...Statement[]];
854
+ type StatementListInWith = [StatementInWith, ...StatementInWith[]];
650
855
  type VariableStatement =
651
856
  | {
652
857
  scope: string;
@@ -673,11 +878,43 @@ type VariableStatement =
673
878
  location: LocationRange;
674
879
  }
675
880
  | {
676
- scope: null;
881
+ type: "RedimExpression";
882
+ declarations: [RedimIdentifierExpression, ...RedimIdentifierExpression[]];
883
+ location: LocationRange;
884
+ }
885
+ | {
886
+ scope: string | null;
887
+ constant: boolean;
888
+ static: false;
889
+ type: "EnumDeclaration";
890
+ declarations: EnumDeclarationList;
891
+ stepoperator: string;
892
+ stepval: number;
893
+ location: LocationRange;
894
+ };
895
+ type VariableStatementInWith =
896
+ | {
897
+ scope: string;
677
898
  constant: false;
678
899
  static_: false;
679
900
  type: "VariableDeclaration";
680
- declarations: [ConstDeclaration];
901
+ declarations: VariableDeclarationListInWith;
902
+ location: LocationRange;
903
+ }
904
+ | {
905
+ scope: string | null;
906
+ constant: true;
907
+ static_: false;
908
+ type: "VariableDeclaration";
909
+ declarations: ConstDeclarationListInWith;
910
+ location: LocationRange;
911
+ }
912
+ | {
913
+ scope: string | null;
914
+ constant: false;
915
+ static_: true;
916
+ type: "VariableDeclaration";
917
+ declarations: VariableDeclarationListInWith;
681
918
  location: LocationRange;
682
919
  }
683
920
  | {
@@ -690,7 +927,7 @@ type VariableStatement =
690
927
  constant: boolean;
691
928
  static: false;
692
929
  type: "EnumDeclaration";
693
- declarations: EnumDeclarationList;
930
+ declarations: EnumDeclarationListInWith;
694
931
  stepoperator: string;
695
932
  stepval: number;
696
933
  location: LocationRange;
@@ -705,6 +942,11 @@ type ExpressionStatement = {
705
942
  expression: Expression;
706
943
  location: LocationRange;
707
944
  };
945
+ type ExpressionStatementInWIth = {
946
+ type: "ExpressionStatement";
947
+ expression: ExpressionInWith;
948
+ location: LocationRange;
949
+ };
708
950
  type IfStatement =
709
951
  | {
710
952
  type: "IfStatement";
@@ -729,24 +971,66 @@ type IfStatement =
729
971
  | ExitStatement;
730
972
  location: LocationRange;
731
973
  };
974
+ type IfStatementInWith =
975
+ | {
976
+ type: "IfStatement";
977
+ test: ExpressionInWith;
978
+ consequent: StatementList | null;
979
+ alternate: (
980
+ | NonNullable<ElseClauseInWith | null>
981
+ | (never[] | NonNullable<ElseIfClausesInWith | null>)[number]
982
+ )[];
983
+ location: LocationRange;
984
+ }
985
+ | {
986
+ type: "IfStatement";
987
+ test: Expression;
988
+ consequent:
989
+ | ExpressionStatement
990
+ | VariableStatement
991
+ | ContinueLoopStatement
992
+ | ContinueCaseStatement
993
+ | ExitLoopStatement
994
+ | ReturnStatement
995
+ | ExitStatement;
996
+ location: LocationRange;
997
+ };
732
998
  type ElseIfClauses = [ElseIfClause, ...ElseIfClause[]];
999
+ type ElseIfClausesInWith = [ElseIfClauseInWith, ...ElseIfClauseInWith[]];
733
1000
  type ElseIfClause = {
734
1001
  type: "ElseIfStatement";
735
1002
  test: Expression;
736
1003
  consequent: StatementList | null;
737
1004
  location: LocationRange;
738
1005
  };
1006
+ type ElseIfClauseInWith = {
1007
+ type: "ElseIfStatement";
1008
+ test: ExpressionInWith;
1009
+ consequent: StatementListInWith | null;
1010
+ location: LocationRange;
1011
+ };
739
1012
  type ElseClause = {
740
1013
  type: "ElseStatement";
741
1014
  consequent: StatementList | null;
742
1015
  location: LocationRange;
743
1016
  };
1017
+ type ElseClauseInWith = {
1018
+ type: "ElseStatement";
1019
+ consequent: StatementListInWith | null;
1020
+ location: LocationRange;
1021
+ };
744
1022
  type ForLoopVariableDeclaration = {
745
1023
  type: "VariableDeclarator";
746
1024
  id: VariableIdentifier;
747
1025
  init: Expression;
748
1026
  location: LocationRange;
749
1027
  };
1028
+ type ForLoopVariableDeclarationInWith = {
1029
+ type: "VariableDeclarator";
1030
+ id: VariableIdentifier;
1031
+ init: ExpressionInWith;
1032
+ location: LocationRange;
1033
+ };
750
1034
  type ForInLoopVariableDeclaration = {
751
1035
  type: "VariableDeclarator";
752
1036
  id: VariableIdentifier;
@@ -781,6 +1065,34 @@ type IterationStatement =
781
1065
  body: never[] | NonNullable<StatementList | null>;
782
1066
  location: LocationRange;
783
1067
  };
1068
+ type IterationStatementInWith =
1069
+ | {
1070
+ type: "DoWhileStatement";
1071
+ body: never[] | NonNullable<StatementListInWith | null>;
1072
+ test: ExpressionInWith;
1073
+ location: LocationRange;
1074
+ }
1075
+ | {
1076
+ type: "WhileStatement";
1077
+ test: ExpressionInWith;
1078
+ body: never[] | NonNullable<StatementListInWith | null>;
1079
+ location: LocationRange;
1080
+ }
1081
+ | {
1082
+ type: "ForStatement";
1083
+ init: ForLoopVariableDeclarationInWith;
1084
+ test: ExpressionInWith;
1085
+ update: ExpressionInWith | null;
1086
+ body: never[] | NonNullable<StatementListInWith | null>;
1087
+ location: LocationRange;
1088
+ }
1089
+ | {
1090
+ type: "ForInStatement";
1091
+ left: ForInLoopVariableDeclaration;
1092
+ right: ExpressionInWith;
1093
+ body: never[] | NonNullable<StatementListInWith | null>;
1094
+ location: LocationRange;
1095
+ };
784
1096
  type EOS =
785
1097
  | [__, SingleLineComment | null, LineTerminatorSequence | EOF]
786
1098
  | [__, EOF];
@@ -788,25 +1100,45 @@ type EOF = undefined;
788
1100
  type __ = Whitespace[];
789
1101
  type LineTerminatorSequence = "\n" | "\r\n" | string;
790
1102
  type Expression = AssignmentExpression;
1103
+ type ExpressionInWith = AssignmentExpressionInWith;
791
1104
  type ExitStatement = {
792
1105
  type: "ExitStatement";
793
1106
  argument: (AssignmentExpression | null) | null;
794
1107
  location: LocationRange;
795
1108
  };
1109
+ type ExitStatementInWIth = {
1110
+ type: "ExitStatement";
1111
+ argument: (AssignmentExpressionInWith | null) | null;
1112
+ location: LocationRange;
1113
+ };
796
1114
  type SwitchStatement = {
797
1115
  type: "SwitchStatement";
798
1116
  discriminant: Expression;
799
1117
  cases: CaseBlock;
800
1118
  location: LocationRange;
801
1119
  };
1120
+ type SwitchStatementInWith = {
1121
+ type: "SwitchStatement";
1122
+ discriminant: ExpressionInWith;
1123
+ cases: CaseBlockInWith;
1124
+ location: LocationRange;
1125
+ };
802
1126
  type CaseBlock =
803
1127
  | (
804
1128
  | DefaultClause
805
1129
  | (never[] | NonNullable<CaseClauses | null>)[number]
806
1130
  | (never[] | NonNullable<CaseClauses | null>)[number]
807
1131
  )[]
808
- | (never[] | NonNullable<CaseClauses | null>);
1132
+ | CaseClauses;
1133
+ type CaseBlockInWith =
1134
+ | (
1135
+ | DefaultClauseInWith
1136
+ | (never[] | NonNullable<CaseClausesInWith | null>)[number]
1137
+ | (never[] | NonNullable<CaseClausesInWith | null>)[number]
1138
+ )[]
1139
+ | CaseClausesInWith;
809
1140
  type CaseClauses = [CaseClause, ...CaseClause[]];
1141
+ type CaseClausesInWith = [CaseClauseInWith, ...CaseClauseInWith[]];
810
1142
  type CaseClause =
811
1143
  | {
812
1144
  type: "SwitchCase";
@@ -815,13 +1147,28 @@ type CaseClause =
815
1147
  location: LocationRange;
816
1148
  }
817
1149
  | SingleLineComment;
1150
+ type CaseClauseInWith =
1151
+ | {
1152
+ type: "SwitchCase";
1153
+ tests: CaseValueListInWith;
1154
+ consequent: never[] | NonNullable<StatementListInWith | null>;
1155
+ location: LocationRange;
1156
+ }
1157
+ | SingleLineComment;
818
1158
  type DefaultClause = {
819
1159
  type: "SwitchCase";
820
1160
  tests: null;
821
1161
  consequent: never[] | NonNullable<StatementList | null>;
822
1162
  location: LocationRange;
823
1163
  };
1164
+ type DefaultClauseInWith = {
1165
+ type: "SwitchCase";
1166
+ tests: null;
1167
+ consequent: never[] | NonNullable<StatementListInWith | null>;
1168
+ location: LocationRange;
1169
+ };
824
1170
  type CaseValueList = [SwitchCaseValue, ...SwitchCaseValue[]];
1171
+ type CaseValueListInWith = [SwitchCaseValueInWith, ...SwitchCaseValueInWith[]];
825
1172
  type SwitchCaseValue =
826
1173
  | {
827
1174
  type: "SwitchCaseRange";
@@ -830,5 +1177,13 @@ type SwitchCaseValue =
830
1177
  location: LocationRange;
831
1178
  }
832
1179
  | Expression;
1180
+ type SwitchCaseValueInWith =
1181
+ | {
1182
+ type: "SwitchCaseRange";
1183
+ from: ExpressionInWith;
1184
+ to: ExpressionInWith;
1185
+ location: LocationRange;
1186
+ }
1187
+ | ExpressionInWith;
833
1188
 
834
1189
  }