puffnfresh / roy

Small functional language that compiles to JavaScript.
http://roy.brianmckenna.org/
MIT License
834 stars 74 forks source link

support/document throw #112

Open gregwebs opened 12 years ago

gregwebs commented 12 years ago

return throw is invalid

a = function(){ throw("NOH!") }
function (){ throw("NOH!") }
b = function(){ return throw("NOH!") }
SyntaxError: Unexpected token throw

I fixed this with

throw msg
null

Simply documenting this for now would be good.