src/core/org/luaj/vm2/compiler/LexState.java: error message on unexpected symbol fixed (it was returning a strange character

corresponding to an internal token code, meaningless to the user)
This commit is contained in:
Fabrice Ducos
2022-06-15 01:10:13 +02:00
parent bfb7da97cf
commit 3c863714b4

View File

@@ -1391,7 +1391,7 @@ public class LexState extends Constants {
return; return;
} }
default: { default: {
this.syntaxerror("unexpected symbol " + t.token + " (" + ((char) t.token) + ")"); this.syntaxerror("unexpected symbol near " + token2str(t.token) + " (code " + t.token + ")");
return; return;
} }
} }