First iteration of parser tree docs.

This commit is contained in:
Dave Halter
2017-05-24 13:50:26 -04:00
parent 7e94b2c4ed
commit a8ef9990b6
2 changed files with 44 additions and 0 deletions

36
docs/docs/parser_tree.rst Normal file
View File

@@ -0,0 +1,36 @@
.. _parser-tree:
Parser Tree
===========
Usage
-----
.. automodule:: parso.python
:members:
:undoc-members:
Parser Tree Base Class
----------------------
All nodes and leaves have these methods/properties:
.. autoclass:: parso.tree.NodeOrLeaf
:members:
:undoc-members:
Python Parser Tree
------------------
.. automodule:: parso.python.tree
:members:
:undoc-members:
:show-inheritance:
Utility
-------
.. autofunction:: parso.tree.search_ancestor

View File

@@ -9,6 +9,14 @@ can also be created by directly instantiating ``Grammar``. More information
about the resulting objects can be found in the :ref:`parser tree documentation
<plugin-api-classes>`.
The simplest way of using parso is without even loading a grammar:
.. sourcecode:: python
>>> import parso
>>> parso.parse('foo + bar')
<Module: @1-1>
.. automodule:: parso.grammar
:members:
:undoc-members: