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

Feature Request: auto-whitespace-on-comma #221

Open
st-cheewah opened this issue Jan 10, 2023 · 1 comment
Open

Feature Request: auto-whitespace-on-comma #221

st-cheewah opened this issue Jan 10, 2023 · 1 comment

Comments

@st-cheewah
Copy link

:auto-whitespace feature is awesome and I will like to propose we use (abuse?) the , marker in ebnf to optionally apply its logic, i.e. add support for something like the followings:

  • :auto-whitespace-on-comma -> insert whitespace detector if , exists between tokens
  • :auto-whitespace-on-no-comma -> insert whitespace detector if , doesn't exist between tokens
@Engelberg
Copy link
Owner

I'm going back through some of the instaparse issues I missed, and came across your feature request. I'd be happy to extend the default auto-whitespace parsers, but I'm not totally clear on how your idea differs from the built-in :auto-whitespace :comma option. Can you provide some example inputs and outputs that show your desired behavior? Thanks for the suggestion.

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