fixes (debugging)

This commit is contained in:
ProgramSnail 2023-05-21 17:00:59 +03:00
parent e6a03ef9bf
commit f2192b5331
6 changed files with 85 additions and 16 deletions

View file

@ -902,7 +902,7 @@ void BuildVisitor::VisitBinaryOperatorExpression(FunctionCallExpression* node) {
FunctionCallExpression* argument_node = std::get<std::unique_ptr<FunctionCallExpression>>(node->arguments[i]).get();
if (argument_node->is_binary_operator_expression
&& argument_node->precedence.has_value()
&& argument_node->precedence.value() >= node->precedence.value()) {
&& argument_node->precedence.value() == node->precedence.value()) {
error_handling::HandleParsingError("Operators can't be chained (left argument)", node->base.start_position, node->base.end_position);
}
}