Add async keyword to native coroutines (Python 3.5)

This commit is contained in:
Michael Hansen
2015-11-13 15:22:19 -08:00
parent 23254897da
commit 9f2930ccaa
2 changed files with 2 additions and 0 deletions

View File

@@ -2607,6 +2607,8 @@ void print_src(PycRef<ASTNode> node, PycModule* mod)
} else {
fprintf(pyc_output, "\n");
start_line(cur_indent);
if (code_src->flags() & PycCode::CO_COROUTINE)
fprintf(pyc_output, "async ");
fprintf(pyc_output, "def ");
print_src(dest, mod);
fprintf(pyc_output, "(");

BIN
tests/35_async_def.pyc Normal file

Binary file not shown.