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

panc: trailing comma in choice type causes parse error #253

Open
jrha opened this issue Sep 17, 2024 · 0 comments · May be fixed by #272
Open

panc: trailing comma in choice type causes parse error #253

jrha opened this issue Sep 17, 2024 · 0 comments · May be fixed by #272
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> ...

@jrha jrha added this to the 10.9 milestone Dec 2, 2024
@jrha jrha changed the title trailing comma in choice type causes parse error panc: trailing comma in choice type causes parse error Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant