[isoltest] Fixes parsing and printing strings with *basic* escape sequences in it.#7080
Merged
christianparpart merged 1 commit intodevelopfrom Jul 22, 2019
Merged
Conversation
chriseth
reviewed
Jul 10, 2019
| break; | ||
| case ABIType::String: | ||
| os << BytesUtils().formatString(_bytes); | ||
| os << BytesUtils().formatString(_bytes, _abiType.size); |
Collaborator
There was a problem hiding this comment.
We apply the cut-off such that [61, 62, 63, 00, .., 00] formats nicely to "abc".
chriseth
reviewed
Jul 10, 2019
chriseth
reviewed
Jul 10, 2019
chriseth
reviewed
Jul 10, 2019
This was referenced Jul 12, 2019
Closed
66c7f12 to
a8caead
Compare
a8caead to
74a56bc
Compare
chriseth
reviewed
Jul 16, 2019
| throw Error(Error::Type::ParserError, "\\x used with no following hex digits."); | ||
|
|
||
| advance(); | ||
| if (current() == '"') |
Contributor
There was a problem hiding this comment.
Shouldn't this be an error? (odd number of hex digits)
Contributor
Author
There was a problem hiding this comment.
No, we actually checked that with what the C/C++ compiler does, which taught us how to treat hex escape sequences at the end of strings. I map the syntax 1:1 and added tests to ensure this. :)
chriseth
reviewed
Jul 16, 2019
…ences in it. We explicitly did not implement a fully conformant ANSI escape sequence parser but only what is needed for now.
74a56bc to
58d8243
Compare
erak
approved these changes
Jul 22, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We explicitly did not implement a fully conformant ANSI escape sequence
parser but only what is needed for now.