[IronPython] Usage of Parser.FromString
Christian Schmidt
Christian2.Schmidt at gmx.de
Mon Aug 14 15:32:06 CEST 2006
Hi,
I'm trying to fill a treeview with the statements found in a embedded
python script. How do I traverse through the tree of parsed statements?
using IronPython;
using IronPython.Compiler;
using IronPython.Compiler.Ast;
void doparse(string txt) {
SystemState ss = new SystemState(engineOptions);
CompilerContext cc = new CompilerContext();
Parser parser = Parser.FromString (ss, cc, txt);
Statement stmt = parser.ParseFileInput();
IAstWalker walker = new ??;
stmt.Walk(walker);
}
More information about the Ironpython-users
mailing list