class _ParseVisitor(visitor.BaseVisitor): (source)
Visitor for parsing a source tree. Attributes: structured_comment_groups: Ordered map from a line range to the "type:" and "pytype:" comments within the range. Line ranges come in several flavors: * Instances of the base LineRange class represent single logical statements. These ranges are ascending and non-overlapping and record all structured comments found. * Instances of the Call subclass represent function calls. These ranges are ascending by start_line but may overlap and only record "pytype:" comments. variable_annotations: Sequence of PEP 526-style variable annotations with line numbers. decorators: Sequence of lines at which decorated functions are defined. defs_start: The line number at which the first class or function definition appears, if any.
Method | __init__ |
Undocumented |
Method | enter_ |
Undocumented |
Method | enter_ |
Undocumented |
Method | generic |
Called when no visit function is found for a node type. |
Method | leave_ |
Undocumented |
Method | leave_ |
Undocumented |
Method | leave_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Instance Variable | block |
Undocumented |
Instance Variable | block |
Undocumented |
Instance Variable | decorators |
Undocumented |
Instance Variable | defs |
Undocumented |
Instance Variable | function |
Undocumented |
Instance Variable | matches |
Undocumented |
Instance Variable | structured |
Undocumented |
Instance Variable | variable |
Undocumented |
Method | _add |
Adds an empty _StructuredComment group with the given line range. |
Method | _process |
Undocumented |
Method | _visit |
Undocumented |
Method | _visit |
Undocumented |
Method | _visit |
Undocumented |
Method | _visit |
Undocumented |
Instance Variable | _raw |
Undocumented |
Inherited from BaseVisitor
:
Method | enter |
Does a pre-order traversal of the AST. |
Method | leave |
Called after visit() to do any cleanup that enter() needs. |
Method | visit |
Does a post-order traversal of the AST. |
Method | _call |
Undocumented |
Method | _children |
Children to recurse over. |
Instance Variable | _ast |
Undocumented |
Instance Variable | _node |
Undocumented |