Sublime Forum

Is there a python ES6 parser

#1

Hi,

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?

Thanks.

0 Likes

#2

This does not seem to be related to Sublime Text at all. Please keep posts on topic.

0 Likes

#3

I don’t get it. Why? Asking an EBNF parser is unrelated in “Ideas and Feature Request” topic?

0 Likes

#4

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).

0 Likes

#5

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

oh and idk if supports es6

0 Likes

#6

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.

0 Likes

#7

I recategorized this under Plugin Development since it is not an idea or feature request for Sublime Text itself.

0 Likes