This commit is contained in:
Mylloon 2023-10-25 00:49:17 +02:00
parent 8108b1c4fc
commit 75e2d0e78c
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -289,6 +289,7 @@ simple_expression:
(* S'il y a qu'1 élément, alors c'est juste une expression *) (* S'il y a qu'1 élément, alors c'est juste une expression *)
match el with | [alone] -> Position.value alone | _ -> Tuple(el) match el with | [alone] -> Position.value alone | _ -> Tuple(el)
} }
mid_expression: mid_expression:
| e=simple_expression { | e=simple_expression {
e e
@ -309,12 +310,11 @@ mid_expression:
/* Record - Construction d'un enregistrement */ /* Record - Construction d'un enregistrement */
| LBRACE l=separated_nonempty_list( | LBRACE l=separated_nonempty_list(
COMMA, COMMA,
separated_pair(located(label_identifier), EQUAL, located(expression)) separated_pair(located(label_identifier), EQUAL, located(mid_expression))
) RBRACE tl=option(type_list) { ) RBRACE tl=option(type_list) {
Record(l, tl) Record(l, tl)
} }
expression: expression:
| e=mid_expression { | e=mid_expression {
e e