[Python-ideas] Enabling access to the AST for Python code

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Jun 13 10:39:53 CEST 2015


On 22/05/2015 02:18, Ben Hoyt wrote:
> Hi Python Ideas folks,
>

[snipped to death]

>
> -Ben

You might find this interesting https://github.com/Psycojoker/baron

The introduction states "Baron is a Full Syntax Tree (FST) library for 
Python. By opposition to an AST which drops some syntax information in 
the process of its creation (like empty lines, comments, formatting), a 
FST keeps everything and guarantees the operation 
fst_to_code(code_to_fst(source_code)) == source_code.".

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Python-ideas mailing list