Mercurial > python-compiler.rs
diff src/ast_dump.rs @ 69:a73eaf42bea1
Add ast.AsyncDefFunction.
author | Bastien Orivel <eijebong@bananium.fr> |
---|---|
date | Mon, 13 Jun 2016 17:54:19 +0200 |
parents | c59ad5ccd8a6 |
children | 2c1e2ce41263 |
line wrap: on
line diff
--- a/src/ast_dump.rs +++ b/src/ast_dump.rs @@ -272,9 +272,10 @@ impl stmt { statements_to_string(indent, body) ) }, - stmt::FunctionDef(name, arguments, body, decorator_list, returns) => { - format!("{}{}def {}({}){}:\n{}", + stmt::FunctionDef(name, arguments, body, decorator_list, returns, async) => { + format!("{}{}{}def {}({}){}:\n{}", decorator_list_to_string(decorator_list, indent), + if async { "async " } else { "" }, current_indent, name, arguments.to_string(),