Skip to content
Snippets Groups Projects
Commit c92672d7 authored by Damien George's avatar Damien George
Browse files

unix: Make -c option parse input script as a file, as per CPython.

Addresses issue #915.
parent b7a4b0f8
No related branches found
No related tags found
No related merge requests found
...@@ -193,7 +193,7 @@ STATIC int do_file(const char *file) { ...@@ -193,7 +193,7 @@ STATIC int do_file(const char *file) {
STATIC int do_str(const char *str) { STATIC int do_str(const char *str) {
mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, str, strlen(str), false); mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, str, strlen(str), false);
return execute_from_lexer(lex, MP_PARSE_SINGLE_INPUT, false); return execute_from_lexer(lex, MP_PARSE_FILE_INPUT, false);
} }
int usage(char **argv) { int usage(char **argv) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment