division entières
This commit is contained in:
4
spf.py
4
spf.py
@ -99,8 +99,8 @@ class SPFInterpreter(lark.visitors.Interpreter):
|
||||
return result[0]
|
||||
if result[1][0].type == "TIMES_OP":
|
||||
return result[0] * result[1][1]
|
||||
elif result[1][0].type == "DIVIDE_OP":
|
||||
return result[0] / result[1][1]
|
||||
elif result[1][0].type == "DIVIDE_OP": # Division entière car nous ne gérons pas les flotants
|
||||
return result[0] // result[1][1]
|
||||
assert "Unreachable"
|
||||
|
||||
def priority(self, el):
|
||||
|
Reference in New Issue
Block a user