Tokens format not compatible with Esprima and other parsers
coderaiser opened this issue · comments
coderaiser commented
esprima and babel
, estree
, acorn
has tokens format that has loc
field:
{
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 8
}
}
}
Would be great if tenko
also has it because recast uses esprima if it can't find tokens
field, but it works great for parsers mentioned earlier.
So compatible tokens field is crucial to avoid double parsing.
Peter van der Zee commented
So the tokens get the locs? Sure that can be done.
I will make it optional as it adds a tax to the GC while the parser doesn't use or need it.
Peter van der Zee commented
Sorry for the delay, but here you go :)
coderaiser commented
Don't you forget to rebuild tenko.prod.js
? Just updated, flag doesn't works for me.