Closed ThierryBleau closed 3 years ago
@ThierryBleau
I added parsing support for records but made two assumptions in the process:
ERecExtend(name, e1, e2)
, I assumed that e1
is the value of the new field and e2
is the record being extended. E.g.: {...x, a: 1}
is parsed as ERecExtend("a", ELit(Int(2)), EVar([], "x"))
.ERecExtend
AST nodes with the inner most ERecExtend
being the first field of the record. E.g.: {a:1, b:2, c:3}
is parsed as
(ERecExtend c
(ELit 3)
(ERecExtend b
(ELit 2)
(ERecExtend a
(ELit 1)
ERecEmpty)))
Please validate (or invalidate) these assumptions
Implements extensible records and refactors type variable tracking.