Creating Control Flow Graph from AST

Oct 4, 2013 at 10:44 AM
I need to create a control flow graph from my AST which Irony generates. Can I do it if I override DoEvaluate method of AstNode? Is it like the DoEvaluate is executed only when the code runs? Or can I invoke the evaluation without running the code? Or is there any other method which the AstNode provides to execute a particular action when it encounters a particular type of node?
Oct 5, 2013 at 5:24 AM
yes, AST nodes in Irony.Interpreter are mainly directed at execution/interpretation. For code analysis (that's what you're doing it seems to me), you should probably
1: create your own AST nodes to hold extra analysis info
2: create analyzers - iterators/visitors to generate the analysis information