-
Notifications
You must be signed in to change notification settings - Fork 683
Rework argument parsing. #1896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework argument parsing. #1896
Conversation
8c27fed
to
051f370
Compare
break; | ||
} | ||
} | ||
} | ||
|
||
if (cli_state.error != NULL) | ||
{ | ||
if (cli_state.arg != NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing braces
051f370
to
f0bec0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after the typo fixes
jerry-main/cli.c
Outdated
* Checks whether the current argument is an option. | ||
* | ||
* Note: | ||
* The state->error is not NULL on error and it contans the error message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: contains
jerry-main/cli.c
Outdated
* string and its arguments are available via state->arg[0..].) | ||
* CLI_OPT_END signals that all command line arguments are consumed. | ||
* Note: | ||
* The state->error is not NULL on error and it contans the error message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
Heavily simplify the interface of CLI. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
f0bec0e
to
cb61cf3
Compare
Thanks, fixed. |
LGTM |
REPL could read JS file from standard input when we passed "-" option, but after jerryscript-project#1896 "-" became invalid option mistakenly. JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác [email protected]
REPL could read JS file from standard input when we passed "-" option, but after #1896 "-" became invalid option mistakenly. JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác [email protected]
Heavily simplify the interface of CLI.