summaryrefslogtreecommitdiff
path: root/qemu-arm/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-arm/main.c')
-rw-r--r--qemu-arm/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/qemu-arm/main.c b/qemu-arm/main.c
index 050774412..a629ceafb 100644
--- a/qemu-arm/main.c
+++ b/qemu-arm/main.c
@@ -12,7 +12,7 @@
#include "py/gc.h"
#include "py/repl.h"
-void do_str(const char *src) {
+void do_str(const char *src, mp_parse_input_kind_t input_kind) {
mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, src, strlen(src), 0);
if (lex == NULL) {
return;
@@ -21,7 +21,7 @@ void do_str(const char *src) {
nlr_buf_t nlr;
if (nlr_push(&nlr) == 0) {
qstr source_name = lex->source_name;
- mp_parse_node_t pn = mp_parse(lex, MP_PARSE_SINGLE_INPUT);
+ mp_parse_node_t pn = mp_parse(lex, input_kind);
mp_obj_t module_fun = mp_compile(pn, source_name, MP_EMIT_OPT_NONE, true);
mp_call_function_0(module_fun);
nlr_pop();
@@ -36,7 +36,7 @@ int main(int argc, char **argv) {
void *heap = malloc(16 * 1024);
gc_init(heap, (char*)heap + 16 * 1024);
mp_init();
- do_str("print('hello world!')");
+ do_str("print('hello world!')", MP_PARSE_SINGLE_INPUT);
mp_deinit();
return 0;
}