Merge branch 'ZackerySpytz-cpp11_u_U_char_encoding_prefixes'

* ZackerySpytz-cpp11_u_U_char_encoding_prefixes:
  Document C++11 UCS-2 UCS-4 and C++17 UTF8 character literals support
  c++17 u8 character literals testcase
  C++17 u8 character literals fix
  C++17 u8 character literals testcase
  Fix the Java tests
  Add support for the C++11 u and U encoding prefixes for char literals
This commit is contained in:
William S Fulton 2019-02-10 17:39:03 +00:00
commit 80b79fc583
8 changed files with 85 additions and 3 deletions

View file

@ -938,10 +938,14 @@ static int look(Scanner *s) {
retract(s, 1);
state = 1000;
}
else if (c == '\'') { /* Definitely u, U or L char */
retract(s, 1);
state = 77;
}
else if (c == 'R') { /* Possibly CUSTOM DELIMITER u, U, L string */
state = 73;
}
else if (c == '8') { /* Possibly u8 string */
else if (c == '8') { /* Possibly u8 string/char */
state = 71;
}
else {
@ -961,7 +965,7 @@ static int look(Scanner *s) {
}
break;
case 71: /* Possibly u8 string */
case 71: /* Possibly u8 string/char */
if ((c = nextchar(s)) == 0) {
state = 76;
}
@ -969,6 +973,10 @@ static int look(Scanner *s) {
retract(s, 1); /* Definitely u8 string */
state = 1000;
}
else if (c=='\'') {
retract(s, 1); /* Definitely u8 char */
state = 77;
}
else if (c=='R') {
state = 74; /* Possibly CUSTOM DELIMITER u8 string */
}