Parsers.jl icon indicating copy to clipboard operation
Parsers.jl copied to clipboard

`xparse` changed behavior after #127 (regression?)

Open KristofferC opened this issue 2 years ago • 1 comments

After #127 the following

using Parsers

opts = Parsers.Options(; quoted=true)

str = """
"key" "value"
"""

r = Parsers.xparse(String, str, 1, length(str), opts)

@show r.tlen

changed from showing 6 to 14. This to me suggests that the parsing no longer stops at the closing delimiter which seems like a regression, but I am not sure.

KristofferC avatar Nov 07 '23 18:11 KristofferC

It seems adding delim=nothing to Parsers.Options gets me back to the previous behavior but not 100% sure. But that make this Option behave differently in some other contexts so it isn't ideal. For now, I worked around it by having one Option for parsing strings and a different one for parsing other stuff.

KristofferC avatar Nov 07 '23 18:11 KristofferC