class documentation

An AST visitor to match traces to nodes. Attributes: source: The source and trace information.

Method __init__ Undocumented
Method enter_Assign Undocumented
Method enter_Module Undocumented
Method leave_Assign Undocumented
Method leave_Module Undocumented
Method match Gets the traces for the given node, along with their locations.
Method match_Attribute Undocumented
Method match_BinOp Undocumented
Method match_Bytes Undocumented
Method match_Call Undocumented
Method match_Constant Undocumented
Method match_Ellipsis Undocumented
Method match_FunctionDef Undocumented
Method match_Import Undocumented
Method match_ImportFrom Undocumented
Method match_Lambda Undocumented
Method match_Name Undocumented
Method match_NameConstant Undocumented
Method match_Num Undocumented
Method match_Str Undocumented
Method match_Subscript Undocumented
Instance Variable source Undocumented
Method _get_match_location Undocumented
Method _get_node_name Undocumented
Method _get_traces Yields matching traces.
Method _match_constant Undocumented
Method _match_import Undocumented
Instance Variable _assign_subscr Undocumented
Instance Variable _matched Undocumented

Inherited from BaseVisitor:

Method enter Does a pre-order traversal of the AST.
Method generic_visit Called when no visit function is found for a node type.
Method leave Called after visit() to do any cleanup that enter() needs.
Method visit Does a post-order traversal of the AST.
Method _call_visitor Undocumented
Method _children Children to recurse over.
Instance Variable _ast Undocumented
Instance Variable _node_children Undocumented
def enter_Assign(self, node): (source)

Undocumented

def enter_Module(self, _): (source)

Undocumented

def leave_Assign(self, _): (source)

Undocumented

def leave_Module(self, _): (source)

Undocumented

def match(self, node): (source)

Gets the traces for the given node, along with their locations.

def match_Attribute(self, node): (source)

Undocumented

def match_BinOp(self, node): (source)

Undocumented

def match_Bytes(self, node): (source)

Undocumented

def match_Call(self, node): (source)

Undocumented

def match_Constant(self, node): (source)

Undocumented

def match_Ellipsis(self, node): (source)

Undocumented

def match_FunctionDef(self, node): (source)

Undocumented

def match_Import(self, node): (source)

Undocumented

def match_ImportFrom(self, node): (source)

Undocumented

def match_Lambda(self, node): (source)

Undocumented

def match_Name(self, node): (source)

Undocumented

def match_NameConstant(self, node): (source)

Undocumented

def match_Num(self, node): (source)

Undocumented

def match_Str(self, node): (source)

Undocumented

def match_Subscript(self, node): (source)

Undocumented

def _get_match_location(self, node, name=None): (source)

Undocumented

def _get_node_name(self, node): (source)

Undocumented

def _get_traces(self, lineno, ops, symbol, maxmatch=-1, num_lines=1): (source)

Yields matching traces. Args: lineno: A starting line number. ops: A list of opcode names to match on. symbol: A symbol or _SymbolMatcher instance to match on. maxmatch: The maximum number of traces to yield. -1 for no maximum. num_lines: The number of consecutive lines to search.

def _match_constant(self, node, value): (source)

Undocumented

def _match_import(self, node, is_from): (source)

Undocumented

_assign_subscr = (source)

Undocumented

_matched = (source)

Undocumented