make const actually work, and add unsafe(const) for old behavior

This commit is contained in:
Ricardo Luís Vaz Silva 2025-02-07 19:39:27 -03:00
commit 7e86116ab1
9 changed files with 25 additions and 16 deletions

View file

@ -177,6 +177,7 @@ std2:
/* Other keywords from UnrealScript */
'abstract' { RET(TK_Abstract); }
'foreach' { RET(ParseVersion >= MakeVersion(4, 10, 0)? TK_ForEach : TK_Identifier); }
'unsafe' { RET(ParseVersion >= MakeVersion(4, 15, 0)? TK_Unsafe : TK_Identifier); }
'true' { RET(TK_True); }
'false' { RET(TK_False); }
'none' { RET(TK_None); }

View file

@ -80,6 +80,7 @@ xx(TK_Color, "'color'")
xx(TK_Goto, "'goto'")
xx(TK_Abstract, "'abstract'")
xx(TK_ForEach, "'foreach'")
xx(TK_Unsafe, "'unsafe'")
xx(TK_True, "'true'")
xx(TK_False, "'false'")
xx(TK_None, "'none'")