Skip to content
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

Handle variadic arguments #30

Merged
merged 5 commits into from
Mar 16, 2022
Merged

Handle variadic arguments #30

merged 5 commits into from
Mar 16, 2022

Conversation

judu
Copy link
Member

@judu judu commented Mar 16, 2022

Variadic arguments are implemented like this:

  • Allow arguments that are not declared. Parse them as strings.
  • Keep the args field which now contains all the args.
  • Add two more fields: namedArgs and unnamedArgs.
  • namedArgs is an object {argName: argValue} with all the declared args. Declaring the args puts their value in this object accessible with their names.
  • unnamedArgs is an array containing all args except the ones in namedArgs. In case you want to iterate over the undeclared args only.

close #7

@judu judu merged commit a36e77e into master Mar 16, 2022
@judu judu deleted the support-for-variadic-arguments branch March 16, 2022 11:55
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.

Support for variadic arguments
1 participant