JSAbrahams / mamba

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

Fin not mut #207

Closed JSAbrahams closed 3 years ago

JSAbrahams commented 3 years ago

Relevant issues

206

Don't merge before #204

Summary

Change grammar slightly to further reduce complexity by removing mut keyword. Everything is mutable by default now, and we use the fin keyword to specify that something is not mutable.

Added Tests

Rewrote test resources to deal with change.

JSAbrahams commented 3 years ago

We need to consider what happens when we. Also, there seems to be a weird bug in the parsing of the function arguments, where if one still uses mut (or any other word) between vararg, and the rest of the argument, the parser doesn't fail but simply interprets this is another argument. We would expect that the parser should fail because the function argument is malformed (there should be a comma between each argument) and not continue silently.