JSAbrahams / mamba

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

WIP Add doc strings and annotations #135

Closed JSAbrahams closed 5 years ago

JSAbrahams commented 5 years ago

Relevant issues

Resolves #119 Also adds annotations, which are useful.

Summary

Add docs strings and annotations. These are either assigned to a variable, function, class or type. While we could just handle them as statements, I think that it is better to couple these together with a node so that the type checker can check annotations. The parser can also ensure that we don't accidentally write documentation that is not linked to anything.

Added Tests

JSAbrahams commented 5 years ago

We will redo this at a later date for a later release.