mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-09 22:25:53 +08:00
Now also add an index.rst.
This commit is contained in:
@@ -7,7 +7,7 @@ Usage
|
|||||||
``load_grammar``. Grammars (with a custom tokenizer and custom parser trees)
|
``load_grammar``. Grammars (with a custom tokenizer and custom parser trees)
|
||||||
can also be created by directly instantiating ``Grammar``. More information
|
can also be created by directly instantiating ``Grammar``. More information
|
||||||
about the resulting objects can be found in the :ref:`parser tree documentation
|
about the resulting objects can be found in the :ref:`parser tree documentation
|
||||||
<plugin-api-classes>`.
|
<parser-tree>`.
|
||||||
|
|
||||||
The simplest way of using parso is without even loading a grammar:
|
The simplest way of using parso is without even loading a grammar:
|
||||||
|
|
||||||
|
|||||||
31
docs/index.rst
Normal file
31
docs/index.rst
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
.. include global.rst
|
||||||
|
|
||||||
|
parso - A Python Parser Written in Python
|
||||||
|
=========================================
|
||||||
|
|
||||||
|
Release v\ |release|. (:doc:`Installation <docs/installation>`)
|
||||||
|
|
||||||
|
.. automodule:: parso
|
||||||
|
|
||||||
|
.. _toc:
|
||||||
|
|
||||||
|
Docs
|
||||||
|
----
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
docs/installation
|
||||||
|
docs/usage
|
||||||
|
docs/parser-tree
|
||||||
|
docs/development
|
||||||
|
|
||||||
|
|
||||||
|
.. _resources:
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---------
|
||||||
|
|
||||||
|
- `Source Code on Github <https://github.com/davidhalter/parso>`_
|
||||||
|
- `Travis Testing <https://travis-ci.org/davidhalter/parso>`_
|
||||||
|
- `Python Package Index <http://pypi.python.org/pypi/parso/>`_
|
||||||
@@ -6,7 +6,7 @@ from parso._compatibility import unicode
|
|||||||
|
|
||||||
|
|
||||||
def splitlines(string, keepends=False):
|
def splitlines(string, keepends=False):
|
||||||
"""
|
r"""
|
||||||
A splitlines for Python code. In contrast to Python's ``str.splitlines``,
|
A splitlines for Python code. In contrast to Python's ``str.splitlines``,
|
||||||
looks at form feeds and other special characters as normal text. Just
|
looks at form feeds and other special characters as normal text. Just
|
||||||
splits ``\n`` and ``\r\n``.
|
splits ``\n`` and ``\r\n``.
|
||||||
|
|||||||
Reference in New Issue
Block a user