Skip to content

Commit cf813e0

Browse files
committed
Make Dict limit to List grammar-wise
1 parent 9f5c415 commit cf813e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jscomp/syntax/src/res_grammar.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ let isAtomicPatternStart = function
137137

138138
let isAtomicExprStart = function
139139
| Token.True | False | Int _ | String _ | Float _ | Codepoint _ | Backtick
140-
| Uident _ | Lident _ | Hash | Lparen | List | Lbracket | Lbrace | LessThan
141-
| Module | Percent ->
140+
| Uident _ | Lident _ | Hash | Lparen | List | Dict | Lbracket | Lbrace
141+
| LessThan | Module | Percent ->
142142
true
143143
| _ -> false
144144

@@ -153,7 +153,7 @@ let isExprStart = 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 ->
156+
| While | Dict ->
157157
true
158158
| _ -> false
159159

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

0 commit comments

Comments
 (0)