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

Support single quoted keys (#61) #193

Closed
wants to merge 1 commit into from
Closed

Conversation

kzys
Copy link
Contributor

@kzys kzys commented Oct 19, 2017

This change supports single quoted keys as like quoted keys. However both don't support escape sequences correctly.

According to the spec;

Quoted keys follow the exact same rules as either basic strings or literal strings and allow you to use a much broader set of key names.

Should we fix both of them in this PR?

@moorereason
Copy link
Contributor

If this PR doesn't implement single-quoted keys correctly, then yes, please fix that in this PR.

@kzys
Copy link
Contributor Author

kzys commented Oct 19, 2017

I've updated the PR to support escape sequence correctly. The logic is pretty similar to lexString(), which should be merged into one function though.

@moorereason
Copy link
Contributor

@kzys, use gofmt.

@kzys
Copy link
Contributor Author

kzys commented Oct 20, 2017

Thanks. Updated the pull request.

pelletier pushed a commit that referenced this pull request Oct 21, 2017
@pelletier
Copy link
Owner

Merged a410399. Thank you for implementing that!

@pelletier pelletier closed this Oct 21, 2017
@kzys kzys deleted the quoted-keys branch October 24, 2017 06:50
pelletier pushed a commit that referenced this pull request Jan 18, 2018
Patch #193 doesn't work correctly because that must be handled by the
lexer, and `parseKey()` must not handle escape sequences.

Ref #61
pelletier added a commit that referenced this pull request Jan 18, 2018
Patch #193 introduced a regression in the toml-tests examples, but it was
never caught because test.sh was exiting with a zero status code, even
though the tests failed. This is because of the `|tee` operation when
invoking toml-test, without setting the pipefail option, reporting the
status code of `tee` instead of `toml-test`.
pelletier added a commit that referenced this pull request Jan 18, 2018
Patch #193 introduced a regression in the toml-tests examples, but it was
never caught because test.sh was exiting with a zero status code, even
though the tests failed. This is because of the `|tee` operation when
invoking toml-test, without setting the pipefail option, reporting the
status code of `tee` instead of `toml-test`.
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

Successfully merging this pull request may close these issues.

3 participants