Skip to content

Commit de6b149

Browse files
committed
Check for more tokens
1 parent a838193 commit de6b149

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/syntax/src/res_core.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4228,8 +4228,8 @@ and parse_record_or_object_type ?current_type_name_path ?inline_types_context
42284228
Asttypes.Closed
42294229
| _ -> Asttypes.Closed
42304230
in
4231-
match (p.token, inline_types_context, current_type_name_path) with
4232-
| Lident _, Some inline_types_context, Some current_type_name_path ->
4231+
match (inline_types_context, current_type_name_path) with
4232+
| Some inline_types_context, Some current_type_name_path when Grammar.is_record_decl_start p.token ->
42334233
let labels =
42344234
parse_comma_delimited_region ~grammar:Grammar.RecordDecl ~closing:Rbrace
42354235
~f:

compiler/syntax/src/res_grammar.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ let is_field_decl_start = function
195195
| _ -> false
196196

197197
let is_record_decl_start = function
198-
| Token.At | Mutable | Lident _ | DotDotDot | String _ -> true
198+
| Token.At | Mutable | Lident _ | DotDotDot -> true
199199
| _ -> false
200200

201201
let is_typ_expr_start = function

0 commit comments

Comments
 (0)