Commit d7337f28 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

minimal: Support even-driven REPL.

parent 87bc8e2b
......@@ -60,7 +60,17 @@ int main(int argc, char **argv) {
gc_init(heap, heap + sizeof(heap));
#endif
mp_init();
#if MICROPY_REPL_EVENT_DRIVEN
pyexec_friendly_repl_init();
for (;;) {
int c = stdin_rx_chr();
if (pyexec_friendly_repl_process_char(c)) {
break;
}
}
#else
pyexec_friendly_repl();
#endif
//do_str("print('hello world!', list(x+1 for x in range(10)), end='eol\\n')");
mp_deinit();
return 0;
......
......@@ -11,6 +11,7 @@
#define MICROPY_MEM_STATS (0)
#define MICROPY_DEBUG_PRINTERS (0)
#define MICROPY_ENABLE_GC (1)
#define MICROPY_REPL_EVENT_DRIVEN (0)
#define MICROPY_HELPER_REPL (1)
#define MICROPY_HELPER_LEXER_UNIX (0)
#define MICROPY_ENABLE_SOURCE_LINE (0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment