fix spelling error

This commit is contained in:
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ data BinaryOperator
| Subtraction | Subtraction
| Multiplication | Multiplication
| Division | Division
| Modulus | Modulo
| BitwiseAnd | BitwiseAnd
| BitwiseOr | BitwiseOr
| BitwiseXor | BitwiseXor

View File

@ -82,7 +82,7 @@ typeCheckExpression (BinaryOperation op expr1 expr2) symtab classes =
TypedExpression "int" (BinaryOperation op expr1' expr2') TypedExpression "int" (BinaryOperation op expr1' expr2')
else else
error "Division operation requires two operands of type int" error "Division operation requires two operands of type int"
Modulus -> Modulo ->
if type1 == "int" && type2 == "int" if type1 == "int" && type2 == "int"
then then
TypedExpression "int" (BinaryOperation op expr1' expr2') TypedExpression "int" (BinaryOperation op expr1' expr2')