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 xregexp #6

Closed brianmhunt closed 11 years ago

brianmhunt commented 11 years ago

When running link.js on XRegExp 3.0pre, I get the following:

/usr/local/lib/node_modules/link/Source/Library/link.js:681
        throw new Error('Unexpected token: ' + token.value + ' at line ' + lineNumbe
              ^
Error: Unexpected token: ) at line 271
    at expect (/usr/local/lib/node_modules/link/Source/Library/link.js:681:9)
    at scanArrayInitializer (/usr/local/lib/node_modules/link/Source/Library/link.js:755:3)
    at scanExpression (/usr/local/lib/node_modules/link/Source/Library/link.js:849:4)
    at scanParenthesis (/usr/local/lib/node_modules/link/Source/Library/link.js:765:3)
    at scanExpression (/usr/local/lib/node_modules/link/Source/Library/link.js:853:4)
    at scanCallExpression (/usr/local/lib/node_modules/link/Source/Library/link.js:796:2)
    at scanIdentifierExpression (/usr/local/lib/node_modules/link/Source/Library/link.js:811:25)
    at scanExpression (/usr/local/lib/node_modules/link/Source/Library/link.js:833:4)
    at scanParenthesis (/usr/local/lib/node_modules/link/Source/Library/link.js:765:3)
    at scanExpression (/usr/local/lib/node_modules/link/Source/Library/link.js:853:4)

Being a regular expression library, it's a jungle in there. But it would be wonderful if link.js were able to parse it.

Cheers.

sebmarkbage commented 11 years ago

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