bjpop / language-python

A parser for Python 2.x and 3.x written in Haskell
157 stars 45 forks source link

Regarding my 3 previous complaints #59

Closed augustss closed 4 years ago

augustss commented 4 years ago

Using the parser I see that I've misunderstood how the library works. I foolishly thought that AST stood for Abstract Syntax Tree, instead it is very much a concrete syntax tree. The AST contains a Paren construct, etc. This is clearly not an abstract syntax tree.

You can ignore my complaints. I wish it were an AST, though.

bjpop commented 4 years ago

Hi @augustss

Thanks for reporting those issues, and sorry that the code doesn't work the way you want.

You are right, it is a concrete syntax tree. So AST is not an accurate name for what it does.

My original intention was to write a library for programmatically generating Python code that would handle the issues you are facing. However, obviously that has not eventuated.

I'll add a note in the documentation for the AST about this.

Hopefully you might be able to find a way to achieve what you want, and apologies if language-python doesn't fit your use case.

I'll close your other issues now.

Cheers, Bernie