Source code for angr.analyses.forward_analysis.visitors.single_node_graph
from .graph import GraphVisitor
[docs]class SingleNodeGraphVisitor(GraphVisitor):
"""
:param node: The single node that should be in the graph.
"""
__slots__ = (
"node",
"node_returned",
)
def __init__(self, node):
super().__init__()
self.node = node
self.node_returned = False
[docs] def next_node(self):
if self.node_returned:
return None
self.node_returned = True
return self.node