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.
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
Initial implementation of raw string literals #1304
Initial implementation of raw string literals #1304
Changes from 46 commits
a4ff50d
a31dda2
d3be382
ece0b7f
4d56ea6
7a32eec
5745c55
d5f69af
75bcbcf
ac735be
ebdf8f7
743aed6
d509aa5
d51377d
855fe32
17bc3cf
9ac7418
43ab9a6
750b034
266359a
8437c5c
51b2af9
b5791ad
1914495
4acf2ae
c8dcc8b
46ed305
cb0039b
9cf8448
54c46c1
78da5b9
3c2e90d
70709cd
6f45efc
00401d8
65facf5
0c91724
f8e8054
7cc8cbb
a45fd15
24d3149
ec4477b
1346f92
bb63820
3a8d488
aa6e246
6a77fea
eae97d5
2aba1f6
4e238e8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is backwards from what I expect:
That way only
#
characters would be consumed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Advance()
needs to be called before callingReadHashTags()
if hashtags are checked first. It is still possible to consume a non#
char after switching the order.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Save a copy of
str
for error messages before you consume the front and back. Also forProcessMultiLineString
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of copying
str
(the parameter type of str is changed to llvm::StringRef to avoid such copies), the string used for error message will be reconstructed by prepending and appending the quotes. The hashtags are not added, to be consistent withProcessMultiLineString
. The error messages inProcessMultiLineString
are handled inParseBlockStringLiteral
, where the hashtags are already removed when calling.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying a
llvm::StringRef
should be cheap, and not involve copying the string.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with copy of
llvm::StringRef
.