Zilliqa / scilla

Scilla - A Smart Contract Intermediate Level Language
https://scilla-lang.org
GNU General Public License v3.0
241 stars 79 forks source link

chore(base): Add comments to AST nodes #1159

Closed jubnzv closed 1 year ago

jubnzv commented 1 year ago

This makes it easier to work with the code base, because sometimes a developer could forget about meaning of some arguments of the expr and stmt constructors.

I use the same commenting style as in the OCaml compiler: https://github.com/ocaml/ocaml/blob/af13e29e0499d479035b064d9d70d9614e76a4fe/parsing/parsetree.mli#L285

anton-trunov commented 1 year ago

This is really useful, thank you! Btw, using anonymous records in constructors would really help remembering the meanings of AST node components and also with standardizing the naming scheme of AST node components. Perhaps this is too big of a refactoring, though.

jubnzv commented 1 year ago

Here is an issue for the further refactoring: #1160