class _ParseVisitor(libcst.CSTVisitor): (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 | 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 |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Constant | METADATA |
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 | _get |
Get _StructuredComment groups that fully contain the given line range. |
Method | _get |
Undocumented |
Method | _has |
Undocumented |
Method | _process |
Process a single comment. |
Method | _visit |
Undocumented |
Method | _visit |
Undocumented |
Method | _visit |
Undocumented |