instaparse icon indicating copy to clipboard operation
instaparse copied to clipboard

Feature Request: auto-whitespace-on-comma

Open st-cheewah opened this issue 3 years ago • 1 comments

: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

st-cheewah avatar Jan 10 '23 00:01 st-cheewah

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.

Engelberg avatar Mar 20 '24 07:03 Engelberg