ghempton / ember-script

Ember-infused CoffeeScript
BSD 3-Clause "New" or "Revised" License
356 stars 27 forks source link

Won't compile list of hashes #21

Open SpencerArtisan opened 11 years ago

SpencerArtisan commented 11 years ago

The following is valid coffeescript and should compile in emberscript too:

Todos.Todo.FIXTURES = [ id: 1 title: "Learn Ember.js" isCompleted: true , id: 2 title: "Go home" isCompleted: false , id: 3 title: "Profit!" isCompleted: false ]

Error is: /Users/spencerward/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:68:in extract_result': Error: Syntax error on line 9, column 1: unexpected ',' (\u002C) (ExecJS::ProgramError) 06 : id: 1 07 : title: "Learn Ember.js" 08 : isCompleted: true 09 : , ^^ :~^ 10 : id: 2 11 : title: "Go home" 12 : isCompleted: false from /Users/spencerward/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:28:inblock in exec' from /Users/spencerward/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:41:in compile_to_tempfile' from /Users/spencerward/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:27:inexec' from /Users/spencerward/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:19:in eval' from /Users/spencerward/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:33:incall' from /Users/spencerward/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/ember_script-0.0.5/lib/ember_script.rb:49:in compile' from make_ember.rb:5:inconvert' from make_ember.rb:11:in block in <main>' from make_ember.rb:11:ineach' from make_ember.rb:11:in `

'

tom-mayer commented 10 years ago

I can reproduce this issue with a similar looking list of hashes.