We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Escaped
As we've been implementing an example JSON parser, we encountered the need to manage "escaped" strings.
Go strings are escaped, and when parsing the following string: {"abc": "123"}, it is interpreted as {\"abc\": \"123\"}.
{"abc": "123"}
{\"abc\": \"123\"}
Its prototype would probably be:
func Escaped[I Bytes, PO, EO any](parse Parser[I, PO], control rune, escape Parser[I, EO]) Result[I, I]
And would behave in the following way:
func main() { result := Escaped(Alpha1(), '\\', OneOf(""n\"))("\"abc\"") result.Output == "abc" }
The text was updated successfully, but these errors were encountered:
oleiade
No branches or pull requests
As we've been implementing an example JSON parser, we encountered the need to manage "escaped" strings.
Go strings are escaped, and when parsing the following string:
{"abc": "123"}
, it is interpreted as{\"abc\": \"123\"}
.Its prototype would probably be:
And would behave in the following way:
The text was updated successfully, but these errors were encountered: