leostera / caramel

:candy: a functional language for building type-safe, scalable, and maintainable applications
https://caramel.run
Apache License 2.0
1.06k stars 25 forks source link

Refactor Erlang AST and Parser to carry location information #25

Closed leostera closed 3 years ago

leostera commented 4 years ago

In order to provide good error messages whenever there is a syntax error or a type error, we need to thread and carry this information on the AST.

banjomet commented 3 years ago

This sounds incredibly useful and I would like to help. What files do you think I should start looking at?

leostera commented 3 years ago

Hej @banjomet this is a rather involved task but I'd be happy to help you get on board sometime soon.

Right now I'm trying to move away from the Menhir parser an into the tree-sitter-erlang parser so the first thing we'd have to do is, well, redefine the Parsetree type 🙈 — worry not! I've got something in the works that I'll be merging sometime soon and we can have this chat again then.

In the meantime, if you want to help out with the tree-sitter-erlang parser that'd be great. The better that gets, the better Erlang parsing Caramel will have 😄

Check it out here: https://github.com/AbstractMachinesLab/tree-sitter-erlang/

leostera commented 3 years ago

I've merged a preliminary Parsetree in erl_parsetree.ml that we can start using. It is not currently in use, but we can start migrating to it.