diff options
author | Zackery Spytz <zspytz@gmail.com> | 2019-02-10 16:06:53 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2019-02-10 16:06:53 +0000 |
commit | 8bf40596b85c8001cf9a529046b86dbcc0fa7475 (patch) | |
tree | ece42beec981a49fd0a6dfd8bd4d2b0dd18416ce /Source | |
parent | e4759ae250d8a44fcb711ce292fa509403dbecb7 (diff) | |
download | swig-8bf40596b85c8001cf9a529046b86dbcc0fa7475.tar.gz |
C++17 u8 character literals fix
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Swig/scanner.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Swig/scanner.c b/Source/Swig/scanner.c index 19cf25fe2..f141037dd 100644 --- a/Source/Swig/scanner.c +++ b/Source/Swig/scanner.c @@ -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 */ } |