Skip to content

Add convenience initializer for raw string literals #579

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

Merged
merged 1 commit into from
Aug 12, 2022

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Aug 11, 2022

This patch adds a small convenience initializer for raw string literals (in preparation of #575) and extends the existing convenience initializer to take custom delimiters.

StringLiteralExpr(raw: "abc")

// now generates

#"abc"#

@fwcd fwcd requested a review from ahoppen as a code owner August 11, 2022 21:45
@fwcd
Copy link
Member Author

fwcd commented Aug 11, 2022

@swift-ci please test

Automatically determine the number of #s required to express the string
without escapes.
@fwcd fwcd force-pushed the raw-string-lit-convenience-init branch from eb39f3e to fa136a9 Compare August 12, 2022 13:31
@fwcd
Copy link
Member Author

fwcd commented Aug 12, 2022

@swift-ci please test

@fwcd fwcd merged commit 1e9e624 into swiftlang:main Aug 12, 2022
@fwcd fwcd deleted the raw-string-lit-convenience-init branch August 12, 2022 14:48
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