JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
85 stars 3 forks source link

Modify AST in type checker and identify constructors #191

Closed JSAbrahams closed 4 years ago

JSAbrahams commented 4 years ago

Relevant issues

Fixes #187 Works towards #186

Summary

Set up the infrastructure to modify the AST tree in the type checker between the building context stage and the actual type checking stage. The same application logic set up can also be used for another pass after the type-checking stage if this is deemed necessary.

We now identify when something is a constructor based on the name of the function, the arguments, and the Context.

Added Tests