From 81ebba7e0236163b7594938201bf3a6b802ebfaa Mon Sep 17 00:00:00 2001 From: pohmelie Date: Wed, 27 Jan 2016 23:23:11 +0300 Subject: py: add async/await/async for/async with syntax They are sugar for marking function as generator, "yield from" and pep492 python "semantically equivalents" respectively. @dpgeorge was the original author of this patch, but @pohmelie made changes to implement `async for` and `async with`. --- py/repl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'py/repl.c') diff --git a/py/repl.c b/py/repl.c index de0e8a4e76..7bd8759084 100644 --- a/py/repl.c +++ b/py/repl.c @@ -57,6 +57,9 @@ bool mp_repl_continue_with_input(const char *input) { || str_startswith_word(input, "with") || str_startswith_word(input, "def") || str_startswith_word(input, "class") + #if MICROPY_PY_ASYNC_AWAIT + || str_startswith_word(input, "async") + #endif ; // check for unmatched open bracket, quote or escape quote -- cgit v1.2.3