dk00 / livescript-next

Enable latest ES features for LiveScript
https://lsn.netlify.com/
The Unlicense
39 stars 3 forks source link

yield appears not to be supported? #5

Closed gkovacs closed 7 years ago

gkovacs commented 7 years ago
a = (name) ->*
  yield foo()

with livescript-next

Error: t.ls: not implemented: Yield (2:2)
  1 | a = (name) ->*
  2 |   yield foo()
    at /Users/geza/livescript-next/node_modules/livescript-next/lib/convert.js:136:43
    at t (/Users/geza/livescript-next/node_modules/livescript-next/lib/convert.js:138:4)
    at convertAll (/Users/geza/livescript-next/node_modules/livescript-next/lib/convert.js:192:42)
    at /Users/geza/livescript-next/node_modules/livescript-next/lib/convert.js:190:28
    at Array.reduce (native)
    at convertAll (/Users/geza/livescript-next/node_modules/livescript-next/lib/convert.js:187:53)
    at convertChildren (/Users/geza/livescript-next/node_modules/livescript-next/lib/convert.js:198:23)
    at /Users/geza/livescript-next/node_modules/livescript-next/lib/convert.js:134:66
    at t (/Users/geza/livescript-next/node_modules/livescript-next/lib/convert.js:138:4)
    at convertAll (/Users/geza/livescript-next/node_modules/livescript-next/lib/convert.js:192:42)

with standard livescript:

// Generated by LiveScript 1.5.0
(function(){
  var a;
  a = function*(name){
    return (yield foo());
  };
}).call(this);
dk00 commented 7 years ago

yield is simply not implemented yet, as the error message says.

Generate functions (->*, function*) and yield expressions will be implemented and enabled in next release.