diff --git a/docs/docs/parser.rst b/docs/docs/parser.rst index 53243800..d9ae642a 100644 --- a/docs/docs/parser.rst +++ b/docs/docs/parser.rst @@ -21,6 +21,15 @@ All nodes and leaves have these methods/properties: :undoc-members: +Python Parser Tree +----------------- + +.. automodule:: jedi.parser.python.tree + :members: + :undoc-members: + :show-inheritance: + + Utility ------- diff --git a/jedi/parser/python/tree.py b/jedi/parser/python/tree.py index ebff95eb..64269b10 100644 --- a/jedi/parser/python/tree.py +++ b/jedi/parser/python/tree.py @@ -461,13 +461,13 @@ class Function(ClassOrFunc): Used to store the parsed contents of a python function. Children: - 0) - 1) - 2) parameter list (including open-paren and close-paren s) - 3 or 5) - 4 or 6) Node() representing function body - 3) -> (if annotation is also present) - 4) annotation (if present) + 0. + 1. + 2. parameter list (including open-paren and close-paren s) + 3. or 5. + 4. or 6. Node() representing function body + 3. -> (if annotation is also present) + 4. annotation (if present) """ type = 'funcdef' @@ -511,10 +511,11 @@ class Lambda(Function): Lambdas are basically trimmed functions, so give it the same interface. Children: - 0) - *) for each argument x - -2) - -1) Node() representing body + + 0. + *. for each argument x + -2. + -1. Node() representing body """ type = 'lambdef' __slots__ = ()