rzimmerman / kal

A powerful, easy-to-use, and easy-to-read programming language for the future.
http://rzimmerman.github.io/kal
MIT License
394 stars 18 forks source link

List expressions have issues with auto-parentheses #35

Closed rzimmerman closed 11 years ago

rzimmerman commented 11 years ago

This code would not compile:

describe 'List Comprehensions', ->
  it 'should support for expressions inside list definitions', ->
   a = [1,2,3,4]
    b = [x+1 for x in a]
    a.should.eql [1,2,3,4]
    b.should.eql [2,3,4,5]

Where this would

describe 'List Comprehensions', ->
  it 'should support for expressions inside list definitions', ->
   a = [1,2,3,4]
    b = [x+1 for x in a]
    a.should.eql([1,2,3,4])
    b.should.eql([2,3,4,5])