flofriday / Moose

🐐 A new fun programming language
MIT License
6 stars 1 forks source link

Inline comments break the parser #15

Closed flofriday closed 2 years ago

flofriday commented 2 years ago
a = 5 // Some inline comment
print(a)

This exits with the following error even though it should definitely work:

-- CompileError ----------------------------------------------------------------

  2| print(a)
     ^^^^^

I expected, the statement to end here (with a newline or semicolon), but it kept going with 'print'.
Tipp: Maybe you forgot an (infix) operator here?
flofriday commented 2 years ago

Wow that was a funny fix