Better documentation for leafs/nodes.

This commit is contained in:
Dave Halter
2017-09-04 20:19:00 +02:00
parent 97d9aeafb7
commit b83c641057
3 changed files with 45 additions and 6 deletions

View File

@@ -7,7 +7,7 @@
<link media="only screen and (max-device-width: 480px)" href="{{
pathto('_static/small_flask.css', 1) }}" type= "text/css" rel="stylesheet" />
<a href="https://github.com/davidhalter/jedi">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me">
</a>
{% endblock %}
{%- block relbar2 %}{% endblock %}

View File

@@ -1,3 +1,5 @@
.. include:: ../global.rst
.. _parser-tree:
Parser Tree
@@ -5,19 +7,33 @@ Parser Tree
The parser tree is returned by calling :py:meth:`parso.Grammar.parse`.
Parser Tree Base Class
----------------------
.. note:: Note that parso positions are always 1 based for lines and zero
based for columns. This means the first position in a file is (1, 0).
Parser Tree Base Classes
------------------------
All nodes and leaves have these methods/properties:
.. autoclass:: parso.tree.BaseNode
:show-inheritance:
:members:
.. autoclass:: parso.tree.Leaf
:show-inheritance:
:members:
.. autoclass:: parso.tree.NodeOrLeaf
:members:
:undoc-members:
:show-inheritance:
Python Parser Tree
------------------
.. currentmodule:: parso.python.tree
.. automodule:: parso.python.tree
:members:
:undoc-members: