🐐 NVLLVUS fix
This commit is contained in:
@@ -133,8 +133,11 @@ def int_to_num(n, m, s=False) -> str:
|
||||
for i in thousands_chars
|
||||
])
|
||||
|
||||
return thousands + int_to_num(n % 1000, m, s)
|
||||
remainder = n % 1000
|
||||
return thousands + (int_to_num(remainder, m, s) if remainder else "")
|
||||
else:
|
||||
if n == 0:
|
||||
return "NVLLVS"
|
||||
nums = []
|
||||
while n > 0:
|
||||
for num, i in list(NUMERALS.items())[::-1]:
|
||||
@@ -779,8 +782,14 @@ class BinOp(Node):
|
||||
raise CentvrionError("Cannot compare strings or arrays with PLVS")
|
||||
return vtable, ValBool((lv or 0) > (rv or 0))
|
||||
case "KEYWORD_EST":
|
||||
if ((isinstance(left, ValInt) and lv == 0 and isinstance(right, ValNul)) or
|
||||
(isinstance(left, ValNul) and isinstance(right, ValInt) and rv == 0)):
|
||||
return vtable, ValBool(True)
|
||||
return vtable, ValBool(lv == rv)
|
||||
case "KEYWORD_DISPAR":
|
||||
if ((isinstance(left, ValInt) and lv == 0 and isinstance(right, ValNul)) or
|
||||
(isinstance(left, ValNul) and isinstance(right, ValInt) and rv == 0)):
|
||||
return vtable, ValBool(False)
|
||||
return vtable, ValBool(lv != rv)
|
||||
case "KEYWORD_ET":
|
||||
return vtable, ValBool(bool(left) and bool(right))
|
||||
|
||||
Reference in New Issue
Block a user