Skip to content

Commit

Permalink
fix token
Browse files Browse the repository at this point in the history
  • Loading branch information
ZZZank committed Oct 11, 2024
1 parent d2c3042 commit 3b21b0b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions common/src/main/java/dev/latvian/mods/rhino/Token.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 3b21b0b

Please sign in to comment.