puffnfresh / roy

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

Syntax errors in typeparser.js #142

Closed bergmark closed 12 years ago

bergmark commented 12 years ago

I'm ran make deps && make on a fresh nodejs install. When running ./roy after this i get the error:

roy/src/typeparser.js:146 if (actiontypeof === "undefined" || action.length! || action[0]!) {

These suffixed exclamation marks are present in a few places in typeparser.js. Why does jison generate this and should it? Obvious syntax error as far as I can tell.

pedrodelgallego commented 12 years ago

Ditto,

./roy -r examples/helloworld.roy

/Users/pdelgallego/code/practice/live/roy/src/typeparser.js:146 if (actiontypeof === "undefined" || action.length! || action[0]!) { ^ module.js:434 var compiledWrapper = runInThisContext(wrapper, filename, true); ^ SyntaxError: Unexpected token ! at Module._compile (module.js:434:25) at Object..js (module.js:464:10) at Module.load (module.js:353:31) at Function._load (module.js:311:12) at Module.require (module.js:359:17) at require (module.js:375:17) at Object. (/Users/pedrodelgallegovida/code/practice/live/roy/src/modules.js:2:18) at Module._compile (module.js:446:26) at Object..js (module.js:464:10) at Module.load (module.js:353:31)

oliver-batchelor commented 12 years ago

Same here. node.js 0.6.18

oliver:roy oliver$ ./roy

/Users/oliver/Downloads/roy/src/typeparser.js:146 if (actiontypeof === "undefined" || action.length! || action[0]!) { ^

module.js:434 var compiledWrapper = runInThisContext(wrapper, filename, true);

SyntaxError: Unexpected token ! at Module._compile (module.js:434:25) at Object..js (module.js:464:10) at Module.load (module.js:353:31) at Function._load (module.js:311:12) at Module.require (module.js:359:17) at require (module.js:375:17) at Object. (/Users/oliver/Downloads/roy/src/modules.js:2:18) at Module._compile (module.js:446:26) at Object..js (module.js:464:10) at Module.load (module.js:353:31)

puffnfresh commented 12 years ago

After deleting node_modules I can reproduce this. Crazy.

puffnfresh commented 12 years ago

I did a binary search until I got a working version of Jison. I have no idea why this so suddenly stopped working.

Can you do a git pull and confirm that 0.2.7 works for you?

bergmark commented 12 years ago

It works! Thank you for your help!

pedrodelgallego commented 12 years ago

It works fro me as well. Thx

adrianheine commented 12 years ago

FYI, this is caused by https://github.com/zaach/reflect.js/commit/df5420535d229dbbb3d43d65c9db0410cd3c82aa#L3L212.