sebmarkbage / link.js

Link.js is a module loader and conversion tool. It supports Labeled Modules, CommonJS and Asynchronous Module Definitions (AMD).
Other
29 stars 9 forks source link

Parse error when parsing coffee-script.js #5

Closed brianmhunt closed 11 years ago

brianmhunt commented 11 years ago

Hi folks,

This is the first of two parse errors I get with link.js. I will file the other report momentarily. It seems when trying to run link.js on coffee-script, I get the following error:

/usr/local/lib/node_modules/link/Source/Library/link.js:681
        throw new Error('Unexpected token: ' + token.value + ' at line ' + lineNumbe
              ^
Error: Unexpected token: indexOf at line 8
    at expect (/usr/local/lib/node_modules/link/Source/Library/link.js:681:9)
    at scanParenthesis (/usr/local/lib/node_modules/link/Source/Library/link.js:770:2)
    at scanStatement (/usr/local/lib/node_modules/link/Source/Library/link.js:1129:3)
    at scanStatements (/usr/local/lib/node_modules/link/Source/Library/link.js:1143:3)
    at scanBlock (/usr/local/lib/node_modules/link/Source/Library/link.js:988:2)
    at scanFunction (/usr/local/lib/node_modules/link/Source/Library/link.js:951:2)
    at scanFunctionExpression (/usr/local/lib/node_modules/link/Source/Library/link.js:983:3)
    at scanExpression (/usr/local/lib/node_modules/link/Source/Library/link.js:841:4)
    at scanStatement (/usr/local/lib/node_modules/link/Source/Library/link.js:1137:3)
    at scanStatements (/usr/local/lib/node_modules/link/Source/Library/link.js:1143:3)

The coffee-script script is used in pretty broad usage, so one would expect it to compile with link.js.

Just thought you should know.

Thanks

sebmarkbage commented 11 years ago

Fixed by above commit. Thanks for the heads up! Please let me know if you find any more.