diff --git a/src/main/java/org/luaj/vm3/compiler/LexState.java b/src/main/java/org/luaj/vm3/compiler/LexState.java index 767645378..82a7612e1 100644 --- a/src/main/java/org/luaj/vm3/compiler/LexState.java +++ b/src/main/java/org/luaj/vm3/compiler/LexState.java @@ -539,23 +539,21 @@ public class LexState { continue; case EOZ: continue; /* will raise an error next loop */ - case 'z': { /* zap following span of spaces */ + case 'z': /* zap following span of spaces */ nextChar(); /* skip the 'z' */ while (isspace(current)) { if (currIsNewline()) inclinenumber(); else nextChar(); } continue; - } case '\\': case '"': case '\'': save_and_next(); continue; - default: { - if (!isdigit(current)) { + default: + if (!isdigit(current)) syntaxerror("invalid escape sequence near '\\" + ((char) current) + "'"); - } else { /* \xxx */ int i = 0; c = 0; @@ -569,7 +567,6 @@ public class LexState { } continue; } - } save(c); nextChar(); continue;