Skip to content

Commit 1fb607b

Browse files
committed
some binary operators do not do binding
1 parent cad9242 commit 1fb607b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

godel-script/godel-frontend/src/sema/ungrounded_checker.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,12 @@ bool ungrounded_parameter_checker::check_non_binding_binary_operator(binary_oper
405405
return node->get_operator_type() == binary_operator::type::add ||
406406
node->get_operator_type() == binary_operator::type::sub ||
407407
node->get_operator_type() == binary_operator::type::mult ||
408-
node->get_operator_type() == binary_operator::type::div;
408+
node->get_operator_type() == binary_operator::type::div ||
409+
node->get_operator_type() == binary_operator::type::compare_not_equal ||
410+
node->get_operator_type() == binary_operator::type::compare_less ||
411+
node->get_operator_type() == binary_operator::type::compare_less_equal ||
412+
node->get_operator_type() == binary_operator::type::compare_great ||
413+
node->get_operator_type() == binary_operator::type::compare_great_equal;
409414
}
410415

411416
bool ungrounded_parameter_checker::visit_call_expr(call_expr* node) {

0 commit comments

Comments
 (0)