From 3b21b0ba88b6320bc7a457f1c54fb771364ca9d6 Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Fri, 11 Oct 2024 20:58:37 +0800 Subject: [PATCH] fix token --- common/src/main/java/dev/latvian/mods/rhino/Token.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/dev/latvian/mods/rhino/Token.java b/common/src/main/java/dev/latvian/mods/rhino/Token.java index 433c3a6b..633efbe1 100644 --- a/common/src/main/java/dev/latvian/mods/rhino/Token.java +++ b/common/src/main/java/dev/latvian/mods/rhino/Token.java @@ -38,9 +38,9 @@ enum CommentType { int EOL = 1; // end of line // Interpreter reuses the following as bytecodes - int FIRST_BYTECODE_TOKEN = EOL + 1; + int FIRST_BYTECODE_TOKEN = 2; - int ENTERWITH = EOL + 1; + int ENTERWITH = 2; int LEAVEWITH = ENTERWITH + 1; int RETURN = LEAVEWITH + 1; int GOTO = RETURN + 1; @@ -118,7 +118,7 @@ enum CommentType { int GETOPTIONAL = OPTIONAL_CHAINING + 1; // End of interpreter bytecodes - int LAST_BYTECODE_TOKEN = GETOPTIONAL + 1; + int LAST_BYTECODE_TOKEN = GETOPTIONAL; int TRY = LAST_BYTECODE_TOKEN + 1; int SEMI = TRY + 1; // semicolon @@ -143,8 +143,8 @@ enum CommentType { int ASSIGN_DIV = ASSIGN_MUL + 1; // /= int ASSIGN_MOD = ASSIGN_DIV + 1; // %= - int FIRST_ASSIGN = ASSIGN_MOD + 1; - int LAST_ASSIGN = FIRST_ASSIGN + 1; + int FIRST_ASSIGN = ASSIGN; + int LAST_ASSIGN = ASSIGN_MOD; int HOOK = LAST_ASSIGN + 1; // tri-conditional (bool ? a : b) int COLON = HOOK + 1;