How are CFG.visit_Break and CFG.visit_Continue get called?
wangkuiyi opened this issue · comments
Hello Tangent Authors,
I got a question as the title of this issue.
I see that class CFG
is a subclass of gast.NodeVisitor
and it has some visit methods. The only place I noticed that would get these visit methods called is in the CFG.visit_statements
method:
Lines 112 to 113 in 3318eca
where gast.NodeVisitor.visit
is called only if the current statement under interest is a control-flow, which includes the following kinds of statements:
Line 20 in 3318eca
My question is that the above tuple doesn't include Break
or Continue
, whereas the class CFG
has visit_Break
and visit_Continue
:
Line 159 in 3318eca
Line 162 in 3318eca
Are these two visit methods get called from somewhere else I didn't notice?
Thank you!
Sorry for bothering. I just realized that the invocation to visit
inside visit_statements
would check inside the loop and conditional structures.