Closed michallepicki closed 3 years ago
@ostera I think this works pretty well now! Erlang doesn't need the begin/end
wrappers when the sequence is directly the body of a function. Do you want me to handle that special case somewhere or are we fine with those additional begin/end
in function definitions?
@ostera I went ahead and implemented the change mentioned above. I think this is ready for review now!
This doesn't add support for parsing begin/end
expression sequences in the erlang
library, if it needs such feature, I am not familiar with that part of the codebase yet
OCaml represents expression sequences as a
(this, next)
expression tuple, where there is no difference in representation of(a ; b ; c)
vs(a ; (b ; c))
. So we're translating this representation to a simplerExpr_seq expr list
in the Erlang AST. When the expression sequence is present directly inside an Erlang function case definition, the expresison sequence doesn't need to be wrapped in abegin end
block when pretty printing.closes #59
Also, compile nested let expressions to expression sequences (relates to #68 ). This is a work in progress - will require generating unique names for variables to avoid scoping issues in Erlang.