@@ -799,6 +799,71 @@ for (var i = 0; i < 10; ++i) 0;
799
799
================================================================================
800
800
` ;
801
801
802
+ exports [` for-in-with-initializer.js [flow] format 1` ] = `
803
+ "Invalid left-hand side in for-in (3:6)
804
+ 1 | // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
805
+ 2 |
806
+ > 3 | for (var a = (b in c) in { } );
807
+ | ^^^^^^^^^^^^^^^^
808
+ 4 | for (var a = 1 || (b in c) in { } );
809
+ 5 | for (var a = 1 + (2 || (b in c)) in { } );
810
+ 6 | for (var a = (() => b in c) in { } );"
811
+ ` ;
812
+
813
+ exports [` for-in-with-initializer.js [typescript] format 1` ] = `
814
+ "',' expected. (9:17)
815
+ 7 | for (var a = 1 || (() => b in c) in { } );
816
+ 8 | for (var a = (() => { b in c ; } ) in { } );
817
+ > 9 | for (var a = [b in c] in { } );
818
+ | ^
819
+ 10 | for (var a = { b : b in c } in { } );
820
+ 11 | // Meriyah can't parse
821
+ 12 | // for (var a = (x = b in c) => { } in { } );
822
+ Cause: ',' expected."
823
+ ` ;
824
+
825
+ exports [` for-in-with-initializer.js format 1` ] = `
826
+ ====================================options=====================================
827
+ parsers: ["babel", "flow", "typescript"]
828
+ printWidth: 80
829
+ | printWidth
830
+ =====================================input======================================
831
+ // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
832
+
833
+ for (var a = (b in c) in { } );
834
+ for (var a = 1 || (b in c) in { } );
835
+ for (var a = 1 + (2 || (b in c)) in { } );
836
+ for (var a = (() => b in c) in { } );
837
+ for (var a = 1 || (() => b in c) in { } );
838
+ for (var a = (() => { b in c ; } ) in { } );
839
+ for (var a = [b in c] in { } );
840
+ for (var a = { b : b in c } in { } );
841
+ // Meriyah can't parse
842
+ // for (var a = (x = b in c) => { } in { } );
843
+ for (var a = class extends (b in c) { } in { } );
844
+ for (var a = function (x = b in c) { } in { } );
845
+
846
+ =====================================output=====================================
847
+ // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
848
+
849
+ for (var a = (b in c) in { } );
850
+ for (var a = (1 || b in c) in { } );
851
+ for (var a = (1 + (2 || b in c)) in { } );
852
+ for (var a = (() => b in c) in { } );
853
+ for (var a = (1 || (() => b in c)) in { } );
854
+ for (var a = (() => {
855
+ b in c ;
856
+ } ) in { } );
857
+ for (var a = ([b in c]) in { } );
858
+ for (var a = ({ b : b in c } ) in { } );
859
+ // Meriyah can't parse
860
+ // for (var a = (x = b in c) => { } in { } );
861
+ for (var a = (class extends (b in c) { } ) in { } );
862
+ for (var a = (function (x = b in c) { } ) in { } );
863
+
864
+ ================================================================================
865
+ ` ;
866
+
802
867
exports [` in.js format 1` ] = `
803
868
====================================options=====================================
804
869
parsers: ["babel", "flow", "typescript"]
@@ -835,6 +900,129 @@ for (a in b) 0;
835
900
================================================================================
836
901
` ;
837
902
903
+ exports [` parentheses.js [flow] format 1` ] = `
904
+ "Unexpected token \` =>\` , expected the token \` ;\` (11:27)
905
+ 9 | for (var a = [b in c];;);
906
+ 10 | for (var a = { b : b in c } ;;);
907
+ > 11 | for (var a = (x = b in c) => { } ;;);
908
+ | ^^
909
+ 12 | for (var a = class extends (b in c) { } ;;);
910
+ 13 | for (var a = function (x = b in c) { } ;;);
911
+ 14 |"
912
+ ` ;
913
+
914
+ exports [` parentheses.js [typescript] format 1` ] = `
915
+ "',' expected. (9:17)
916
+ 7 | for (var a = 1 || (() => b in c);;);
917
+ 8 | for (var a = (() => { b in c ; } );;);
918
+ > 9 | for (var a = [b in c];;);
919
+ | ^
920
+ 10 | for (var a = { b : b in c } ;;);
921
+ 11 | for (var a = (x = b in c) => { } ;;);
922
+ 12 | for (var a = class extends (b in c) { } ;;);
923
+ Cause: ',' expected."
924
+ ` ;
925
+
926
+ exports [` parentheses.js format 1` ] = `
927
+ ====================================options=====================================
928
+ parsers: ["babel", "flow", "typescript"]
929
+ printWidth: 80
930
+ | printWidth
931
+ =====================================input======================================
932
+ // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
933
+
934
+ for (var a = (b in c);;);
935
+ for (var a = 1 || (b in c);;);
936
+ for (var a = 1 + (2 || (b in c));;);
937
+ for (var a = (() => b in c);;);
938
+ for (var a = 1 || (() => b in c);;);
939
+ for (var a = (() => { b in c ; } );;);
940
+ for (var a = [b in c];;);
941
+ for (var a = { b : b in c } ;;);
942
+ for (var a = (x = b in c) => { } ;;);
943
+ for (var a = class extends (b in c) { } ;;);
944
+ for (var a = function (x = b in c) { } ;;);
945
+
946
+ for (var a in (b in c));
947
+ for (var a in 1 || (b in c));
948
+ for (var a in 1 + (2 || (b in c)));
949
+ for (var a in (() => b in c));
950
+ for (var a in 1 || (() => b in c));
951
+ for (var a in (() => { b in c ; } ));
952
+ for (var a in [b in c]);
953
+ for (var a in { b : b in c } );
954
+ for (var a in (x = b in c) => { } );
955
+ for (var a in class extends (b in c) { } );
956
+ for (var a in function (x = b in c) { } );
957
+
958
+ for (;a = (b in c););
959
+ for (;a = 1 || (b in c););
960
+ for (;a = 1 + (2 || (b in c)););
961
+ for (;a = (() => b in c););
962
+ for (;a = 1 || (() => b in c););
963
+ for (;a = (() => { b in c ; } ););
964
+ for (;a = [b in c];);
965
+ for (;a = { b : b in c } ;);
966
+ for (;a = (x = b in c) => { } ;);
967
+ for (;a = class extends (b in c) { } ;);
968
+ for (;a = function (x = b in c) { } ;);
969
+
970
+ =====================================output=====================================
971
+ // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
972
+
973
+ for (var a = (b in c); ; );
974
+ for (var a = 1 || (b in c); ; );
975
+ for (var a = 1 + (2 || (b in c)); ; );
976
+ for (var a = () => (b in c); ; );
977
+ for (var a = 1 || (() => (b in c)); ; );
978
+ for (
979
+ var a = () => {
980
+ (b in c );
981
+ } ;
982
+ ;
983
+
984
+ );
985
+ for (var a = [(b in c)]; ; );
986
+ for (var a = { b : (b in c ) } ; ; );
987
+ for (var a = (x = (b in c)) => { } ; ; );
988
+ for (var a = class extends (b in c) { } ; ; );
989
+ for (var a = function (x = (b in c)) { } ; ; );
990
+
991
+ for (var a in b in c);
992
+ for (var a in 1 || b in c);
993
+ for (var a in 1 + (2 || b in c));
994
+ for (var a in () => b in c);
995
+ for (var a in 1 || (() => b in c));
996
+ for (var a in () => {
997
+ b in c ;
998
+ } );
999
+ for (var a in [b in c]);
1000
+ for (var a in { b : b in c } );
1001
+ for (var a in (x = b in c) => { } );
1002
+ for (var a in class extends (b in c) { } );
1003
+ for (var a in function (x = b in c) { } );
1004
+
1005
+ for (; (a = b in c); );
1006
+ for (; (a = 1 || b in c); );
1007
+ for (; (a = 1 + (2 || b in c)); );
1008
+ for (; (a = () => b in c); );
1009
+ for (; (a = 1 || (() => b in c)); );
1010
+ for (
1011
+ ;
1012
+ (a = () => {
1013
+ b in c ;
1014
+ } );
1015
+
1016
+ );
1017
+ for (; (a = [b in c]); );
1018
+ for (; (a = { b : b in c } ); );
1019
+ for (; (a = (x = b in c) => { } ); );
1020
+ for (; (a = class extends (b in c) { } ); );
1021
+ for (; (a = function (x = b in c) { } ); );
1022
+
1023
+ ================================================================================
1024
+ ` ;
1025
+
838
1026
exports [` var.js format 1` ] = `
839
1027
====================================options=====================================
840
1028
parsers: ["babel", "flow", "typescript"]
0 commit comments