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:
where gast.NodeVisitor.visit is called only if the current statement under interest is a control-flow, which includes the following kinds of statements:
Hello Tangent Authors,
I got a question as the title of this issue.
I see that class
CFG
is a subclass ofgast.NodeVisitor
and it has some visit methods. The only place I noticed that would get these visit methods called is in theCFG.visit_statements
method:https://github.com/google/tangent/blob/3318ecab3eec71ef97702df66a59d1a2197c8de3/tangent/cfg.py#L112-L113
where
gast.NodeVisitor.visit
is called only if the current statement under interest is a control-flow, which includes the following kinds of statements:https://github.com/google/tangent/blob/3318ecab3eec71ef97702df66a59d1a2197c8de3/tangent/grammar.py#L20
My question is that the above tuple doesn't include
Break
orContinue
, whereas the classCFG
hasvisit_Break
andvisit_Continue
:https://github.com/google/tangent/blob/3318ecab3eec71ef97702df66a59d1a2197c8de3/tangent/cfg.py#L159
https://github.com/google/tangent/blob/3318ecab3eec71ef97702df66a59d1a2197c8de3/tangent/cfg.py#L162
Are these two visit methods get called from somewhere else I didn't notice?
Thank you!