Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
c92672d7
Commit
c92672d7
authored
Oct 17, 2014
by
Damien George
Browse files
unix: Make -c option parse input script as a file, as per CPython.
Addresses issue #915.
parent
b7a4b0f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
unix/main.c
View file @
c92672d7
...
...
@@ -193,7 +193,7 @@ STATIC int do_file(const char *file) {
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
);
return
execute_from_lexer
(
lex
,
MP_PARSE_
SING
LE_INPUT
,
false
);
return
execute_from_lexer
(
lex
,
MP_PARSE_
FI
LE_INPUT
,
false
);
}
int
usage
(
char
**
argv
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment