[MIRROR] Consts (#11652)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-14 15:23:02 -07:00
committed by GitHub
parent 5826f765e7
commit 9ffd5403b9
12 changed files with 55 additions and 41 deletions

View File

@@ -26,16 +26,6 @@
OOP_UNARY - Unary Operators
OOP_GROUP - Parentheses
*/
var/const/OOP_OR = 1 // ||
var/const/OOP_AND = OOP_OR + 1 // &&
var/const/OOP_BIT = OOP_AND + 1 // &, |
var/const/OOP_EQUAL = OOP_BIT + 1 // ==, !=
var/const/OOP_COMPARE = OOP_EQUAL + 1 // >, <, >=, <=
var/const/OOP_ADD = OOP_COMPARE + 1 // +, -
var/const/OOP_MULTIPLY= OOP_ADD + 1 // *, /, %
var/const/OOP_POW = OOP_MULTIPLY + 1 // ^
var/const/OOP_UNARY = OOP_POW + 1 // !
var/const/OOP_GROUP = OOP_UNARY + 1 // ()
/*
Class: node

View File

@@ -3,10 +3,10 @@
/*
File: Keywords
*/
var/const/KW_FAIL = 0 //Fatal error; stop parsing entire script.
var/const/KW_PASS = 1 //OK
var/const/KW_ERR = 2 //Non-fatal error, keyword couldn't be handled properly. Ignore keyword but continue on.
var/const/KW_WARN = 3 //Warning
#define KW_FAIL 0 //Fatal error; stop parsing entire script.
#define KW_PASS 1 //OK
#define KW_ERR 2 //Non-fatal error, keyword couldn't be handled properly. Ignore keyword but continue on.
#define KW_WARN 3 //Warning
/*
var/const/Class: n_Keyword
@@ -156,3 +156,8 @@ var/const/Represents a special statement in the code triggered by a keyword.
else
parser.errors+=new/scriptError/BadToken(parser.curToken)
return KW_FAIL
#undef KW_FAIL
#undef KW_PASS
#undef KW_ERR
#undef KW_WARN