diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2017-02-22 15:31:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-02-22 15:31:59 (GMT) |
commit | cb41b2766de646435743b6af7dd152751b54e73f (patch) | |
tree | 4033a04617524787defe4699c45327783fe44d8d /Parser/Python.asdl | |
parent | 1bc156430bad8177b5beecf57979628c1d071230 (diff) | |
download | cpython-cb41b2766de646435743b6af7dd152751b54e73f.zip cpython-cb41b2766de646435743b6af7dd152751b54e73f.tar.gz cpython-cb41b2766de646435743b6af7dd152751b54e73f.tar.bz2 |
bpo-29463: Add docstring field to some AST nodes. (#46)
* bpo-29463: Add docstring field to some AST nodes.
ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring
field for now. It was first statement of there body.
* fix document. thanks travis!
* doc fixes
Diffstat (limited to 'Parser/Python.asdl')
-rw-r--r-- | Parser/Python.asdl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl index f470ad1..526cffb 100644 --- a/Parser/Python.asdl +++ b/Parser/Python.asdl @@ -6,7 +6,7 @@ module Python { - mod = Module(stmt* body) + mod = Module(stmt* body, string? docstring) | Interactive(stmt* body) | Expression(expr body) @@ -14,15 +14,18 @@ module Python | Suite(stmt* body) stmt = FunctionDef(identifier name, arguments args, - stmt* body, expr* decorator_list, expr? returns) + stmt* body, expr* decorator_list, expr? returns, + string? docstring) | AsyncFunctionDef(identifier name, arguments args, - stmt* body, expr* decorator_list, expr? returns) + stmt* body, expr* decorator_list, expr? returns, + string? docstring) | ClassDef(identifier name, expr* bases, keyword* keywords, stmt* body, - expr* decorator_list) + expr* decorator_list, + string? docstring) | Return(expr? value) | Delete(expr* targets) |