enhanced the reader and compiler to treat characters and strings prefixed with b and u as a limited range character and a byte array with internal terminating null at the back

This commit is contained in:
2024-01-25 23:48:06 +09:00
parent 4d0d50dea9
commit aaa6e35787
10 changed files with 127 additions and 11 deletions

View File

@ -19,6 +19,7 @@ check_ERRORS = \
feed-5002.err \
feed-5003.err \
feed-5004.err \
feed-5005.err \
mlist-5001.err \
var-5001.err \
var-5002.err \

View File

@ -490,6 +490,7 @@ check_ERRORS = \
feed-5002.err \
feed-5003.err \
feed-5004.err \
feed-5005.err \
mlist-5001.err \
var-5001.err \
var-5002.err \

4
t/feed-5005.err Normal file
View File

@ -0,0 +1,4 @@
## a code point greater than 255 is illegal in the character literal prefix fixed with b.
printf "[%c] [#x%x] [%d]\n" '★' '★' #x2605;
printf "[%c]\n" b'★'; ##ERROR: syntax error - wrong character literal