-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Merged
Merged
Changes from 24 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
a4ff50d
test cases for raw string literals
SlaterLatiao a31dda2
raw string literal implementation
SlaterLatiao d3be382
match as block string if starting with triple ", and better error mes…
SlaterLatiao ece0b7f
fix broken test case
SlaterLatiao 4d56ea6
test cases for raw string literals
SlaterLatiao 7a32eec
raw string literal implementation
SlaterLatiao 5745c55
match as block string if starting with triple ", and better error mes…
SlaterLatiao d5f69af
fix broken test case
SlaterLatiao 75bcbcf
Merge branch 'raw_string' of github.com:SlaterLatiao/carbon-lang into…
SlaterLatiao ac735be
removed unused initial value
SlaterLatiao ebdf8f7
rename flag to indicate multi-line string and remove comment
SlaterLatiao 743aed6
use * to get value from std::optional
SlaterLatiao d509aa5
clean-ups
SlaterLatiao d51377d
removed skip_scan flag and directly return in case of a single line s…
SlaterLatiao 855fe32
Updated error message: simple string -> single-line string.
SlaterLatiao 17bc3cf
Updated test cases according to changes in error message
SlaterLatiao 9ac7418
Removed counting_hashtag flag.
SlaterLatiao 43ab9a6
Implemented ScanHelper class to handle scanning
SlaterLatiao 750b034
Fixed explanation of ReadHashTags.
SlaterLatiao 266359a
Addressed PR comment.
SlaterLatiao 8437c5c
Clarify that scan_helper holds the source text.
SlaterLatiao 51b2af9
Addressed PR comments.
SlaterLatiao b5791ad
Updated error messages in test cases.
SlaterLatiao 1914495
Added const keyword to return type of GetCurrentStr().
SlaterLatiao 4acf2ae
addressed PR comments.
SlaterLatiao c8dcc8b
Addressed PR comments.
SlaterLatiao 46ed305
Removed the multi_line flag and skip_read field to improve readability.
SlaterLatiao cb0039b
Merge branch 'raw_string' of github.com:SlaterLatiao/carbon-lang into…
SlaterLatiao 9cf8448
Copied default parameter value to definition of UnescapeStringLiteral.
SlaterLatiao 54c46c1
Copied default parameter value to definition of ParseBlockStringLiteral.
SlaterLatiao 78da5b9
Prefix CARBON_ to SIMPLE_TOKEN and ARG_TOKEN macros.
SlaterLatiao 3c2e90d
Merge branch 'raw_string' of github.com:SlaterLatiao/carbon-lang into…
SlaterLatiao 70709cd
Rollback redefinition of arguments.
SlaterLatiao 6f45efc
Updated comment on the flex macro.
SlaterLatiao 00401d8
Updated wording.
SlaterLatiao 65facf5
Moved the EOF error out of the loop.
SlaterLatiao 0c91724
Removed duplicated declaration.
SlaterLatiao f8e8054
Changed type of `hashtag_num` and `leading_quotes` to int.
SlaterLatiao 7cc8cbb
Minor fix: string copy.
SlaterLatiao a45fd15
Added comment on YyinputWrapper.
SlaterLatiao 24d3149
Garmmar in comment.
SlaterLatiao ec4477b
Added check of eof before readling next char.
SlaterLatiao 1346f92
Minor updates based on PR comments.
SlaterLatiao bb63820
Minor changes to address PR comments.
SlaterLatiao 3a8d488
Used a clearer way to calculate `hashtag_num` and `leading_quotes`. S…
SlaterLatiao aa6e246
Directly copy StringRef for compilation error message.
SlaterLatiao 6a77fea
Make str_with_quote const as we don't change it.
SlaterLatiao eae97d5
Added TODO for unsupported cases.
SlaterLatiao 2aba1f6
Merged upstream trunk into raw_string.
SlaterLatiao 4e238e8
Fixed a typo.
SlaterLatiao File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Use
int
instead ofsize_t
. Avoid unsigned types unless they are needed: https://google.github.io/styleguide/cppguide.html#Integer_TypesThere 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.
Replaced
size_t
withint
.