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

trailing comma in choice type causes parse error #253

Open
jrha opened this issue Sep 17, 2024 · 0 comments
Open

trailing comma in choice type causes parse error #253

jrha opened this issue Sep 17, 2024 · 0 comments
Milestone

Comments

@jrha
Copy link
Member

jrha commented Sep 17, 2024

Other types and functions handle a trailing comma gracefully.

This pollutes diffs when long lists of choices are written out one-per-line.

bind '/g' = choice(
    'a very long option',
    'another slightly longer option',
);

Results in:

Encountered: )
Was expecting one of:
    <HEREDOC_STRING> ...
    <SINGLE_QUOTED_STRING> ...
    <DOUBLE_QUOTED_STRING> ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant