evincarofautumn / kitten

A statically typed concatenative systems programming language.
http://kittenlang.org/
Other
1.1k stars 41 forks source link

Bad error message on misuse of 'option' #67

Closed strager closed 8 years ago

strager commented 11 years ago
option 10 some:  // Error is actually here
  noop
else:            // Error is reported here
  noop

// :3:1: compile error:
// unexpected else
// expecting end of input
strager commented 11 years ago

Does this still apply with the macro change? (I don't have the Kitten compiler available right now.)

evincarofautumn commented 11 years ago

Yes. If the corrected version is:

\option 10 some:
  drop noop
else:
  noop

Then this gives the same error as your test case:

option 10 some:
  drop noop
else:
  noop

At the very least it should offer a friendly suggestion.

evincarofautumn commented 8 years ago

No longer an issue in the new compiler.