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

join doesn't work with repeat minimum of 0 #33

Open
phipsgabler opened this issue Dec 5, 2021 · 0 comments
Open

join doesn't work with repeat minimum of 0 #33

phipsgabler opened this issue Dec 5, 2021 · 0 comments

Comments

@phipsgabler
Copy link

I want to parse zero or more things, separated by commas. However, join always includes at least one repetition:

julia> Repeat("a", max=2)("")
SubString{String}[]

julia> Repeat("a", max=2)("a")
1-element Vector{SubString{String}}:
 "a"

julia> join(Repeat("a", max=2), ",")
🗄 Sequence |> map(#90)
├─ a 
└─ ,a{,1} Sequence |> map(#68) |> Repeat
::Vector{SubString{String}}


julia> join(Repeat("a", max=2), ",")("a")
1-element Vector{SubString{String}}:
 "a"

julia> join(Repeat("a", max=2), ",")("")
ERROR: ArgumentError: no successfull parsing.
...
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

1 participant