gkz / LiveScript

LiveScript is a language which compiles to JavaScript. It has a straightforward mapping to JavaScript and allows you to write expressive code devoid of repetitive boilerplate. While LiveScript adds many features to assist in functional style programming, it also has many improvements for object oriented and imperative programming.
http://livescript.net
MIT License
2.31k stars 156 forks source link

`for..else` doesn't work with the implicit `for array` variant #1035

Closed pepkin88 closed 6 years ago

pepkin88 commented 6 years ago

Compiling this:

for [1 2 3]
  ..
else 0

gives an error Parse error on line 3: Unexpected 'ELSE'.

Working examples:

for n in [1 2 3]
  n
else 0
for [1 2 3] when 1
  ..
else 0