File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1107,6 +1107,7 @@ void tokenize(Buf *buf, Tokenization *out) {
1107
1107
if (t.unicode ) {
1108
1108
if (t.char_code > 0x10ffff ) {
1109
1109
tokenize_error (&t, " unicode value out of range: %x" , t.char_code );
1110
+ break ;
1110
1111
}
1111
1112
if (t.cur_tok ->id == TokenIdCharLiteral) {
1112
1113
t.cur_tok ->data .char_lit .c = t.char_code ;
@@ -1147,6 +1148,7 @@ void tokenize(Buf *buf, Tokenization *out) {
1147
1148
switch (c) {
1148
1149
case ' \' ' :
1149
1150
tokenize_error (&t, " expected character" );
1151
+ break ;
1150
1152
case ' \\ ' :
1151
1153
t.state = TokenizeStateStringEscape;
1152
1154
break ;
@@ -1390,8 +1392,10 @@ void tokenize(Buf *buf, Tokenization *out) {
1390
1392
case TokenizeStateCharCode:
1391
1393
if (t.cur_tok ->id == TokenIdStringLiteral) {
1392
1394
tokenize_error (&t, " unterminated string" );
1395
+ break ;
1393
1396
} else if (t.cur_tok ->id == TokenIdCharLiteral) {
1394
1397
tokenize_error (&t, " unterminated character literal" );
1398
+ break ;
1395
1399
} else {
1396
1400
zig_unreachable ();
1397
1401
}
You can’t perform that action at this time.
0 commit comments