Ok thanks for the info, I am still however curious about these "tests" are just tests (which may or may not happen) that determine the AST, for example which node to use ?�
Or are they tests related to unit testing class PythonParserTests ?
Also you said I need to use the visitor created by PythonParser I assume you mean PyRootNodeVisitor ? Just as it is explained in the AST chapter of the documentation.�In my case this simple python list will need me to subclass it and override method visitListmaker , the aListmaker passed as argument to the method should I assume it is PyListmakerNode ?
On Fri, Jan 30, 2015 at 10:50 AM, Thierry Goubier <thierry.goubier@gmail.com> wrote:Hi kilon,
The tests instance variable is linked to the python grammar: top level items in an expression are probably tests, and, through the grammar, tests can be just atoms.
So the tests instance variable doesn't means it is testing anything :)
Thierry
Le 30 janv. 2015 09:23, "kilon alios" <kilon.alios@gmail.com> a �crit :Ok so I tried to parse a very simple list like[ 67,12342,5 ]using Parse and explore , I can find these number by following this AST (for example 67)PyFileInputNode>>statements: -> 1: PySimpleStmNode>>stmts: -> 1: PyExprStmtNode>>tests: ->1: PyPowerNode>>atom: -> PyAtomNode>>list: -> 1: PyPowerNode>>atom: -> PyPowerNode>>numberToken -> numberToken>>value -> 67quite a structure, but the one thing I dont get is "tests" , why "tests" ?�Does it tests something and if yes what ?