This repository was archived by the owner on Jun 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +35
-2
lines changed
parsing/grammar/expressions Expand file tree Collapse file tree 5 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -624,7 +624,10 @@ let rec scan scanner =
624
624
if scanner.ch == CharacterCodes. forwardslash then
625
625
let () = next scanner in
626
626
Token. LessThanSlash
627
- else
627
+ else if scanner.ch == CharacterCodes. equal then (
628
+ next scanner;
629
+ Token. LessEqual
630
+ ) else
628
631
Token. LessThan
629
632
) else if scanner.ch == CharacterCodes. equal then (
630
633
next scanner;
Original file line number Diff line number Diff line change @@ -1036,7 +1036,19 @@ let _ =
1036
1036
[@JSX ]))))
1037
1037
|> Array.of_list)
1038
1038
|> ReasonReact.array)
1039
- [@ns.braces ])] ())[@JSX ])"
1039
+ [@ns.braces ])] ())[@JSX ])
1040
+ ;;((div ~children:[((Js.log (a <= 10))[@ns.braces ])] ())[@JSX ])
1041
+ ;;((div
1042
+ ~children:[((div ~children:[((Js.log (a <= 10))[@ns.braces ])] ())
1043
+ [@JSX ])] ())[@JSX ])
1044
+ ;;((div
1045
+ ~children:[((div ~onClick:((fun _ -> Js.log (a <= 10))
1046
+ [@ns.namedArgLoc ][@ns.braces ])
1047
+ ~children:[((div
1048
+ ~children:[((Js.log (a <= 10))
1049
+ [@ns.braces ])] ())
1050
+ [@JSX ])] ())
1051
+ [@JSX ])] ())[@JSX ])"
1040
1052
` ;
1041
1053
1042
1054
exports [` list.js 1` ] = `
Original file line number Diff line number Diff line change @@ -478,3 +478,9 @@ let _ = <View style=styles["backgroundImageWrapper"]>
478
478
| > Array . of_list
479
479
| > ReasonReact . array }
480
480
</ div > ;
481
+
482
+ // https://github.com/rescript-lang/syntax/issues/113
483
+ // < = should be scanned as <=
484
+ < div > { Js . log ( a <= 10 ) } </ div >
485
+ < div > < div > { Js . log ( a <= 10 ) } </ div > </ div >
486
+ < div > < div onClick = { _ => Js . log ( a <= 10 ) } > < div > { Js . log ( a <= 10 ) } </ div > </ div > </ div >
Original file line number Diff line number Diff line change @@ -2694,6 +2694,13 @@ let x = <MyComponent sidebar={<div> test </div>} nav={<Navbar />} />
2694
2694
| > Array .of_list
2695
2695
| > ReasonReact .array }
2696
2696
</div >
2697
+
2698
+ // https://github.com/rescript-lang/syntax/issues/113
2699
+ <div > { Js .log (a <= 10 )} </div >
2700
+ <div > <div > { Js .log (a <= 10 )} </div > </div >
2701
+ <div >
2702
+ <div onClick = { _ => Js .log (a <= 10 )} > <div > { Js .log (a <= 10 )} </div > </div >
2703
+ </div >
2697
2704
"
2698
2705
` ;
2699
2706
Original file line number Diff line number Diff line change @@ -261,3 +261,8 @@ let x = <MyComponent sidebar=<div> test </div> nav=<Navbar /> />
261
261
| > Array . of_list
262
262
| > ReasonReact . array }
263
263
</div >
264
+
265
+ // https://github.com/rescript-lang/syntax/issues/113
266
+ < div > { Js . log ( a <= 10 ) } </ div >
267
+ < div > < div > { Js . log ( a <= 10 ) } </ div > < / d i v >
268
+ < div > < div onClick = { _ => Js . log ( a <= 10 ) } > < div > { Js . log ( a <= 10 ) } </ div > </ div > < / d i v >
You can’t perform that action at this time.
0 commit comments