This commit is contained in:
2024-02-21 15:08:01 +01:00
parent b6949f6a73
commit b388a6a95c
11 changed files with 31 additions and 8 deletions

View File

@ -50,7 +50,7 @@ class ExpVariable(Exp):
self.variable_name = variable_id
def __repr__(self) -> str:
return f"exp_variable({self.variable_name})"
return f"variable({self.variable_name})"
def eval(self, vtable, ftable):
return vtable, ftable, vtable[self.variable_name]
@ -369,7 +369,7 @@ class Program(BaseBox):
def __init__(self, statements: list[Statement]) -> None:
self.statements = statements
random.seed(str(self))
r = random.randint(1,20)
r = random.randint(1,10)
if r == 1:
print("E004: Random compiler error")
exit()