comparison 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
comparison
equal deleted inserted replaced
68:c59ad5ccd8a6 69:a73eaf42bea1
270 arguments.join(", ") 270 arguments.join(", ")
271 }, 271 },
272 statements_to_string(indent, body) 272 statements_to_string(indent, body)
273 ) 273 )
274 }, 274 },
275 stmt::FunctionDef(name, arguments, body, decorator_list, returns) => { 275 stmt::FunctionDef(name, arguments, body, decorator_list, returns, async) => {
276 format!("{}{}def {}({}){}:\n{}", 276 format!("{}{}{}def {}({}){}:\n{}",
277 decorator_list_to_string(decorator_list, indent), 277 decorator_list_to_string(decorator_list, indent),
278 if async { "async " } else { "" },
278 current_indent, 279 current_indent,
279 name, 280 name,
280 arguments.to_string(), 281 arguments.to_string(),
281 match returns { 282 match returns {
282 None => String::new(), 283 None => String::new(),