Skip to content

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

Merged
merged 1 commit into from
Jul 3, 2017

Conversation

zherczeg
Copy link
Member

Heavily simplify the interface of CLI.

break;
}
}
}

if (cli_state.error != NULL)
{
if (cli_state.arg != NULL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing braces

Copy link
Contributor

@LaszloLango LaszloLango left a 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.
Copy link
Contributor

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.
Copy link
Contributor

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]
@zherczeg
Copy link
Member Author

Thanks, fixed.

@yichoi
Copy link
Contributor

yichoi commented Jul 3, 2017

LGTM

@yichoi yichoi merged commit e6832f5 into jerryscript-project:master Jul 3, 2017
@zherczeg zherczeg deleted the rework_arg_parse branch July 4, 2017 03:39
ossy-szeged added a commit to ossy-szeged/jerryscript that referenced this pull request Nov 29, 2019
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]
rerobika pushed a commit that referenced this pull request Nov 29, 2019
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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants