-
Notifications
You must be signed in to change notification settings - Fork 4
feat: optional spaces and whitespaces #76
Copy link
Copy link
Open
Labels
A-parsersArea: Issues related to parsersArea: Issues related to parsersC-feature-acceptedCategory: A feature request that has been accepted and awaiting implementationCategory: A feature request that has been accepted and awaiting implementationP-mediumPriority: MediumPriority: Medium
Description
Metadata
Metadata
Assignees
Labels
A-parsersArea: Issues related to parsersArea: Issues related to parsersC-feature-acceptedCategory: A feature request that has been accepted and awaiting implementationCategory: A feature request that has been accepted and awaiting implementationP-mediumPriority: MediumPriority: Medium
What problem does this feature solve?
Currently the
whitespaceparser is strict and requires at least one character to be matched. There are many cases where I need to wrap it intooptionalparser e.g. the spaces before and after argument braces are optional.Describe the solution
I think aligning this parser with other API would be a little bit more convenient by matching the current pairs such as
manyandmany1,sepByandsepBy1:whitespaces1- requires a single or multiple characters, works as the currentwhitespacewhitespaces- requires zero or more whitespaces to match, works asoptional(whitespace)wrapWhitespacesandwrapWhitespaces1- that should prevent writing the common pattern of surrounding whitespaces over and over again: