Totem-Studios / lotus

Lotus is a type-safe compiled programming languages designed to simplify systems programming, achieving memory safety using RAII.
https://totemstudios.org/lotus
MIT License
4 stars 2 forks source link

Name shadowing and return statements without expressions #31

Closed lucasnorman07 closed 2 months ago

lucasnorman07 commented 2 months ago

Added a scope stack to keep track of different variable names in different scopes, which is turn enables support for name shadowing where multiple variables in different scopes can share the same name. Also added return statements without expressions and more errors if functions that don't have a return type are called in expressions. Also fixed an issue where \n was not handled correctly.

pontushenriksson commented 2 months ago

Good job! :) _seal