diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-08 11:33:28 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-08 11:33:28 +0000 |
commit | 73c79b992508ac3a72212d91db2eb5a8dd1aa60f (patch) | |
tree | 3e71f87f15e246f21774529914d1e90c0d782532 | |
parent | 443e018a3f3720bcea3cee34fcde1033d9a8a218 (diff) | |
download | micropython-73c79b992508ac3a72212d91db2eb5a8dd1aa60f.tar.gz micropython-73c79b992508ac3a72212d91db2eb5a8dd1aa60f.zip |
py: Continue line if last character is backslash.
-rw-r--r-- | py/repl.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -67,6 +67,11 @@ bool mp_repl_continue_with_input(const char *input) { return true; } + // continue if last character was backslash (for line continuation) + if (i[-1] == '\\') { + return true; + } + // continue if compound keyword and last line was not empty if (starts_with_compound_keyword && i[-1] != '\n') { return true; |