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

Parser support for attributes with multiple arguments #2248

Closed
drmacdon opened this issue Jul 14, 2024 · 1 comment
Closed

Parser support for attributes with multiple arguments #2248

drmacdon opened this issue Jul 14, 2024 · 1 comment

Comments

@drmacdon
Copy link

Currently the Grammar for attribute is,

attribute     : NAME ( '(' string ')' )?

Which is limiting if you would like an attribute to have more than one argument. ie. to support a script attribute (#1479, #2192) it would benefit from having multiple arguments in addition to the command. ie.

[script("bash", "-e")]
[script("python", "-W", "all)]
[script("pwsh", "-NonInteractive")]
[script("nu", "--log-level", "debug")]

The error returned for too many arguments could also be better handled if support for multiple arguments was present. confirm.rs:confirm_recipe_with_prompt_too_many_args.

@casey
Copy link
Owner

casey commented Jul 14, 2024

I think this should be added if and when we add an attribute which needs it.

@casey casey closed this as completed Jul 14, 2024
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

No branches or pull requests

2 participants