Skip to content

Commit 02d200d

Browse files
bloodyowlcknitt
authored andcommitted
Make Dict limit to List grammar-wise
1 parent 74ef2e2 commit 02d200d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jscomp/syntax/src/res_grammar.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ let is_atomic_pattern_start = function
138138
let is_atomic_expr_start = function
139139
| Token.True | False | Int _ | String _ | Float _ | Codepoint _ | Backtick
140140
| Uident _ | Lident _ | Hash | Lparen | List | Lbracket | Lbrace | LessThan
141-
| Module | Percent | Forwardslash | ForwardslashDot ->
141+
| Module | Percent | Forwardslash | ForwardslashDot | Dict ->
142142
true
143143
| _ -> false
144144

@@ -153,7 +153,7 @@ let is_expr_start = function
153153
| For | Hash | If | Int _ | Lbrace | Lbracket | LessThan | Lident _ | List
154154
| Lparen | Minus | MinusDot | Module | Percent | Plus | PlusDot | String _
155155
| Switch | True | Try | Uident _ | Underscore (* _ => doThings() *)
156-
| While | Forwardslash | ForwardslashDot ->
156+
| While | Forwardslash | ForwardslashDot | Dict ->
157157
true
158158
| _ -> false
159159

@@ -266,7 +266,7 @@ let is_block_expr_start = function
266266
| False | Float _ | For | Forwardslash | ForwardslashDot | Hash | If | Int _
267267
| Lbrace | Lbracket | LessThan | Let | Lident _ | List | Lparen | Minus
268268
| MinusDot | Module | Open | Percent | Plus | PlusDot | String _ | Switch
269-
| True | Try | Uident _ | Underscore | While ->
269+
| True | Try | Uident _ | Underscore | While | Dict ->
270270
true
271271
| _ -> false
272272

0 commit comments

Comments
 (0)