summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-25 13:51:19 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-25 13:51:19 +0000
commitb829b5caecd1ba4fbc30e03978776d2c868dd67b (patch)
treeb3135377105920ff382d7c7ebc2117655b4d00da /unix
parente0722ee9d94c0e812a474e349ded5147f6b869f6 (diff)
downloadmicropython-b829b5caecd1ba4fbc30e03978776d2c868dd67b.tar.gz
micropython-b829b5caecd1ba4fbc30e03978776d2c868dd67b.zip
Implement mp_parse_node_free; print properly repr(string).
Diffstat (limited to 'unix')
-rw-r--r--unix/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/unix/main.c b/unix/main.c
index 34d9618ca2..212bbe877e 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -62,7 +62,6 @@ static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind
*/
mp_obj_t module_fun = mp_compile(pn, source_name, is_repl);
- parse_node_free_struct(pn);
if (module_fun == mp_const_none) {
// compile error
@@ -139,7 +138,7 @@ static void do_repl(void) {
}
}
- mp_lexer_t *lex = mp_lexer_new_from_str_len("<stdin>", line, strlen(line), false);
+ mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, line, strlen(line), false);
execute_from_lexer(lex, MP_PARSE_SINGLE_INPUT, true);
free(line);
}
@@ -163,7 +162,7 @@ static void do_file(const char *file) {
}
static void do_str(const char *str) {
- mp_lexer_t *lex = mp_lexer_new_from_str_len("<stdin>", str, strlen(str), false);
+ mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, str, strlen(str), false);
execute_from_lexer(lex, MP_PARSE_SINGLE_INPUT, false);
}