MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / add_ordinary_node

Method add_ordinary_node

tensorflow/python/autograph/pyct/cfg.py:367–380  ·  view source on GitHub ↗

Grows the graph by adding an ordinary CFG node. Ordinary nodes are followed by the next node, in lexical order, that is, they become the new leaf set. Args: ast_node: ast.AST Returns: Node

(self, ast_node)

Source from the content-addressed store, hash-verified

365 self.active_stmts.remove(stmt)
366
367 def add_ordinary_node(self, ast_node):
368 """Grows the graph by adding an ordinary CFG node.
369
370 Ordinary nodes are followed by the next node, in lexical order, that is,
371 they become the new leaf set.
372
373 Args:
374 ast_node: ast.AST
375 Returns:
376 Node
377 """
378 node = self._add_new_node(ast_node)
379 self.leaves = set((node,))
380 return node
381
382 def _add_jump_node(self, ast_node, guards):
383 """Grows the graph by adding a jump node.

Callers 4

enter_loop_sectionMethod · 0.95
visit_ClassDefMethod · 0.80
visit_FunctionDefMethod · 0.80

Calls 1

_add_new_nodeMethod · 0.95

Tested by

no test coverage detected