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

Add support for parsing raw string literals #112

Merged
merged 3 commits into from
Jun 6, 2018

Conversation

ebkalderon
Copy link
Contributor

Added

  • Add support for parsing Rust-style raw string literals.

Changed

  • Update string unit test to verify string literal deserialization.

Fixes #111.

Copy link
Collaborator

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one question from me

src/de/tests.rs Outdated
let raw_hashes: String = from_str("r#\"String\"#").unwrap();
assert_eq!("String", raw_hashes);

let raw_hashes_quote: String = from_str("r##\"String with \"#\"##").unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we test the multi-line raw strings?

Copy link
Contributor Author

@ebkalderon ebkalderon Jun 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll add that in.

@ebkalderon
Copy link
Contributor Author

@kvark I've added a test case for multi-line string literals. This PR and the test both preserve carriage returns in string literals, as described in #111 (comment).

Copy link
Collaborator

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!
bors r+

bors bot added a commit that referenced this pull request Jun 6, 2018
112: Add support for parsing raw string literals r=kvark a=ebkalderon

### Added

* Add support for parsing Rust-style raw string literals.

### Changed

* Update string unit test to verify string literal deserialization.

Fixes #111.

Co-authored-by: Eyal Kalderon <ebkalderon@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jun 6, 2018

Build succeeded

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.

2 participants