From e1ef9c086fd90230219e8950b44836fe34b6f107 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 24 May 2017 14:09:50 -0400 Subject: [PATCH] Now also add an index.rst. --- docs/docs/usage.rst | 2 +- docs/index.rst | 31 +++++++++++++++++++++++++++++++ parso/utils.py | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 docs/index.rst diff --git a/docs/docs/usage.rst b/docs/docs/usage.rst index 5697ff7..1c741f4 100644 --- a/docs/docs/usage.rst +++ b/docs/docs/usage.rst @@ -7,7 +7,7 @@ Usage ``load_grammar``. Grammars (with a custom tokenizer and custom parser trees) can also be created by directly instantiating ``Grammar``. More information about the resulting objects can be found in the :ref:`parser tree documentation -`. +`. The simplest way of using parso is without even loading a grammar: diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..47e8964 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,31 @@ +.. include global.rst + +parso - A Python Parser Written in Python +========================================= + +Release v\ |release|. (:doc:`Installation `) + +.. automodule:: parso + +.. _toc: + +Docs +---- + +.. toctree:: + :maxdepth: 2 + + docs/installation + docs/usage + docs/parser-tree + docs/development + + +.. _resources: + +Resources +--------- + +- `Source Code on Github `_ +- `Travis Testing `_ +- `Python Package Index `_ diff --git a/parso/utils.py b/parso/utils.py index c5e41a3..1582f56 100644 --- a/parso/utils.py +++ b/parso/utils.py @@ -6,7 +6,7 @@ from parso._compatibility import unicode def splitlines(string, keepends=False): - """ + r""" A splitlines for Python code. In contrast to Python's ``str.splitlines``, looks at form feeds and other special characters as normal text. Just splits ``\n`` and ``\r\n``.