def forward(node, analysis):
  """Perform a given analysis on all functions within an AST."""
  if not isinstance(analysis, Forward):
    raise TypeError('not a valid forward analysis object')
  for succ in gast.walk(node):
    if isinstance(succ, gast.FunctionDef):
      cfg_obj = CFG.build_cfg(succ)
      analysis.visit(cfg_obj.entry)
  return node
def forward ( node , analysis ) : if not isinstance ( analysis , Forward ) : raise TypeError ( 'not a valid forward analysis object' ) for succ in gast . walk ( node ) : if isinstance ( succ , gast . FunctionDef ) : cfg_obj = CFG . build_cfg ( succ ) analysis . visit ( cfg_obj . entry ) return node
Perform a given analysis on all functions within an AST.