C++17 u8 character literals fix

This commit is contained in:
Zackery Spytz 2019-02-10 16:06:53 +00:00 • committed by William S Fulton
commit 8bf40596b8

View file

@ -945,7 +945,7 @@ static int look(Scanner *s) {
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 {
@ -965,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;
}
@ -973,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 */
}