Make it possible to pun the first argument of a record.
This commit is contained in:
parent
fb7abe045f
commit
990ae0e3a8
@ -932,6 +932,17 @@ sequence_or_record_in:
|
|||||||
| None ->
|
| None ->
|
||||||
PaRecord {r_elts = ($1, []); r_terminator = None}
|
PaRecord {r_elts = ($1, []); r_terminator = None}
|
||||||
}
|
}
|
||||||
|
| field_name more_field_assignments {
|
||||||
|
let value = {
|
||||||
|
field_name = $1;
|
||||||
|
assignment = ghost;
|
||||||
|
field_expr = EVar $1 }
|
||||||
|
in
|
||||||
|
let field_name = {$1 with value} in
|
||||||
|
let (comma, elts) = $2 in
|
||||||
|
let r_elts = Utils.nsepseq_cons field_name comma elts in
|
||||||
|
PaRecord {r_elts; r_terminator = None}
|
||||||
|
}
|
||||||
|
|
||||||
sequence_or_record:
|
sequence_or_record:
|
||||||
"{" sequence_or_record_in "}" {
|
"{" sequence_or_record_in "}" {
|
||||||
|
Loading…
Reference in New Issue
Block a user