bjpop / language-python

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

Feature Request: Add helper functions to construct Common.AST #52

Open MarisaKirisame opened 5 years ago

MarisaKirisame commented 5 years ago

I am trying to compile a DSL into python, and I found using this easier than manipulating string or doc myself. However, it is still very cumbersome with all those annotation flying around (when I construct the AST, I want anno to be ()). Another problem is, there is an expr_literal field in Float/Int, and it is the field that guide the pretty print (instead of the literal value). so this make it harder to generate floating point literal in python.