-
Notifications
You must be signed in to change notification settings - Fork 15
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
Unclear documentation for getstring
#119
Comments
I think it is the "escapechar", so usually you'd pass here's how Line 46 in b1da070
As you say, we should improve the docs! |
Hm, I have no
|
ah, i see. I'd strongly recommend explicitly creating an Anyway, I believe for The default for Arguably the Also, is |
Actually, that is not correct, the default is julia> Parsers.Options().quoted
false
julia> res = Parsers.xparse(String, str)
Parsers.Result{PosLen}(-32603, 15, PosLen(0x0000000000200003))
julia> Parsers.text(res.code)
"encountered an opening quote character, initial value parsing succeeded, reached EOF, invalid delimiter"
julia> res = Parsers.xparse(String, str, 1, sizeof(str), Parsers.Options(; quoted=true))
Parsers.Result{PosLen}(5, 6, PosLen(0x0000000000200003))
julia> Parsers.text(res.code)
"encountered an opening quote character, initial value parsing succeeded" |
yikes, we have too many different julia> Parsers.xparse(String, str) # == Parsers.xparse(String, str; quoted=true)
options.quoted = true
Parsers.Result{PosLen}(-32603, 15, PosLen(0x0000000000200003))
julia> Parsers.xparse(String, str, 1, sizeof(str))
options.quoted = true
Parsers.Result{PosLen}(-32603, 15, PosLen(0x0000000000200003))
julia> Parsers.xparse(String, str, 1, sizeof(str), Parsers.Options())
options.quoted = false
Parsers.Result{PosLen}(33, 15, PosLen(0x000000000010000f))
julia> Parsers.xparse(String, str, 1, sizeof(str), Parsers.Options(; quoted=true))
options.quoted = true
Parsers.Result{PosLen}(5, 6, PosLen(0x0000000000200003))
This is now very off-topic from your original issue (sorry), so can move it to a new issue, but i think perhaps we could simplify the I think i'd be in favour of requiring a user-given cc @quinnj EDIT: opened #124 |
@nickrobinson251, yeah, the |
Here is a part of the docs for
getstring
But
getstring
takes 3 arguments, the last one which is callede
. I don't see any description ofe
in the docstring and how it should be used. Looking at the tests, it seems that 0x00 is passed in.The text was updated successfully, but these errors were encountered: