millermedeiros / rocambole

Recursively walk and transform EcmaScript AST
171 stars 12 forks source link

Implement esprima "raw" option #14

Closed nzakas closed 10 years ago

nzakas commented 10 years ago

Looks like most of the esprima options are supported except for raw. This is really useful for tools like ESLint that sometimes want to look at the raw source.

millermedeiros commented 10 years ago

Looking at the esprima docs:

Note: In version > 1.0, raw is ignored since literals always include the verbatim source.

Any example of a node that would use that? I enabled it on my code but could not see any diff on the AST.

nzakas commented 10 years ago

I'm going to have to look closer. We had seen differences with regards to escaped characters, but I wonder if that's since been addressed. Will take a look.