forked from SonarOpenCommunity/sonar-cxx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [Delimited escape sequences](https://en.cppreference.com/w/cpp/language/escape) [P2290R3](https://wg21.link/P2290R3) - [Named universal character escapes](https://en.cppreference.com/w/cpp/language/escape#Named_universal) [P2071R2](https://wg21.link/P2071R2) - linked SonarOpenCommunity#2536
- Loading branch information
Showing
4 changed files
with
114 additions
and
141 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
24 changes: 24 additions & 0 deletions
24
cxx-squid/src/test/resources/parser/own/C++23/escape-sequences.cc
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// simple escape sequences | ||
auto s1 = '\''; | ||
auto s2 = '\"'; | ||
auto s3 = '\?'; | ||
auto s4 = '\\'; | ||
auto s5 = '\a'; | ||
auto s6 = '\b'; | ||
auto s7 = '\f'; | ||
auto s8 = '\n'; | ||
auto s9 = '\r'; | ||
auto s10 = '\t'; | ||
auto s11 = '\v'; | ||
|
||
// numeric escape sequences | ||
auto n1 = '\123'; | ||
auto n2 = '\o{12345}'; | ||
auto n3 = '\xABCDEF'; | ||
auto n4 = '\x{ABFF}'; | ||
|
||
// universal character names | ||
auto u1 = '\u1234'; | ||
auto u2 = '\u{112233FF}'; | ||
auto u3 = '\U12345678'; | ||
auto u4 = '\N{NULL}'; |