The nested JS parser in GCLI does not handle nested { and }

RESOLVED FIXED

Status

()

Firefox
Developer Tools
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jwalker, Assigned: jwalker)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

For example:

> echo { (function() { return 'foo'; })() }

Requisition._tokenize will fail due to the nested { and }.
Commonly we expect people to use the scratchpad for complex JS expressions, and to properly comprehend this issue isn't just as simple as counting the nesting levels (due to strings, regexes, comments and other dangers)

The full solution would involve uglify/narcussus or the embedded JS parser in FF.
We should consider at least detecting this problem and warning the user rather than acting bizarrely.
Assignee: nobody → jwalker
Blocks: 675923
No longer blocks: 659052
See also bug 683121
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.