cafe.js.parse() chokes on odd input #4

gabebw opened this Issue Feb 3, 2011 · 0 comments


None yet
1 participant

gabebw commented Feb 3, 2011

This input makes the JS parser choke:
var1 = /[x]/;
var2 = "]";
var3 = "


with this error:
Error: Parse error on line 3:
...lass='test e'>";
at Object. (/usr/local/lib/node/.npm/cafe/0.1.0/package/lib/js.js:96:19)
at Object.parse (/usr/local/lib/node/.npm/cafe/0.1.0/package/lib/js/parser.js:544:32)
at Object.parse (/usr/local/lib/node/.npm/cafe/0.1.0/package/lib/js.js:117:25)
at Object.parse (/usr/local/lib/node/.npm/cafe/0.1.0/package/lib/js.js:23:28)
at Object.parse (/usr/local/lib/node/.npm/cafe/0.1.0/package/lib/js.js:51:27)
at [object Context]:1:3
at Interface. (repl:96:19)
at Interface.emit (events:31:17)
at Interface._ttyWrite (readline:309:12)
at Interface.write (readline:147:30)

I think it's something with how strings are handled in the JS grammar, and which characters are allowed, but I'm not sure.

@gabebw gabebw closed this Jan 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment