private SemanticType checkIntegerOperator ( Expr . BinaryOperator expr , Environment environment ) { checkOperand ( Type . Int , expr . getFirstOperand ( ) , environment ) ; checkOperand ( Type . Int , expr . getSecondOperand ( ) , environment ) ; return Type . Int ; }
Check the type for a given arithmetic operator . Such an operator has the type int and all children should also produce values of type int .