Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AssertionError when running examples/identity on underscore.js #14

Closed
benjamn opened this issue Nov 27, 2012 · 1 comment
Closed
Labels

Comments

@benjamn
Copy link
Owner

benjamn commented Nov 27, 2012

Using Underscore version 1.4.2:
http://underscorejs.org/underscore.js

Stack trace:

assert.js:102
  throw new assert.AssertionError({
        ^
AssertionError: false == true
    at pushSlice (/Users/benjamn/node_modules/recast/lib/patcher.js:34:20)
    at Patcher.self.get (/Users/benjamn/node_modules/recast/lib/patcher.js:50:9)
    at self.getReprinter (/Users/benjamn/node_modules/recast/lib/parser.js:63:28)
    at print (/Users/benjamn/node_modules/recast/lib/printer.js:42:20)
    at self.getReprinter (/Users/benjamn/node_modules/recast/lib/parser.js:59:21)
    at Array.forEach (native)
    at self.getReprinter (/Users/benjamn/node_modules/recast/lib/parser.js:55:22)
    at print (/Users/benjamn/node_modules/recast/lib/printer.js:42:20)
    at self.getReprinter (/Users/benjamn/node_modules/recast/lib/parser.js:59:21)
    at Array.forEach (native)
@benjamn
Copy link
Owner Author

benjamn commented Nov 27, 2012

Seems to be related to the way source locations are assigned to regular expression literals.

benjamn added a commit that referenced this issue Nov 27, 2012
The file regexp-props.js is a reduced test case for a bug exposed by underscore.js (issue #14).
benjamn added a commit that referenced this issue Nov 29, 2012
The file regexp-props.js is a reduced test case for a bug exposed by underscore.js (issue #14).
benjamn added a commit that referenced this issue Nov 29, 2012
This may be an Esprima bug, but, if it's not a bug, then the most reasonable interpretation of negative indices is the Pythonic one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant