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

Preserve original Identifier node name somewhere: required for source-map names array #85

Open
nopnop opened this issue Jul 12, 2013 · 1 comment

Comments

@nopnop
Copy link

nopnop commented Jul 12, 2013

The source-map names array of the Source Map Revision 3 Proposal, allows you to find the original name of a mangled identifier.

Introduced in escodegen: estools/escodegen#113, the resulting names array is wrong (the names used are the mangled names, not the originals names).

May I suggest to keep somewhere in the mangled node, a property with the original name (sourceName or whatever) ?

{ type: 'Identifier',
  name: 'a',
  sourceName: 'foobar',
  range: [ 362, 363 ],
  loc: 
   { start: { line: 15, column: 17 },
     end: { line: 15, column: 18 } } }

Then, this pr estools/escodegen#113 may be re-open to use sourceName instead of name.

@tarruda
Copy link

tarruda commented Oct 5, 2013

@nopnop does any browser currently supports this feature? For me chrome still shows the mangled variable names(when debugging with source maps, hovering over an original variable name does nothing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants