I googled it a bit but could not find a complete solution, do you know an ES6 parser (AST generator) written with python? If not what is the right direction to do it? I am thinking about my own implementation, so far grako looks promising and found ES6 bnf, is there anyone worked on that?
Did I misunderstand you, or you are asking a question about a Python package not necessarily used in Sublime Text? If so, then I guess the question fits better in StackOverflow (with Python tag).
is still interesting as one can use it on a package. developing a javascript autocomplete I found you can parse with esprima via nodejs and then get a json in python to well do anything you want. I didn’t manage to finally use it because is very complicated and requires time I don’t have
Exactly, tern plugin uses this method. I also could achieve something similar using Babel parser but i find it very slow. It takes up to 3-4 seconds for a file imported 7 modules. That is why i am thinking about parsing JS code with Python, looking at grako and parsimonious both looks very promising.