Implement while loops

This commit is contained in:
2024-12-28 14:33:35 +01:00
parent d46608b358
commit 20949c7829
7 changed files with 257 additions and 46 deletions

View File

@ -525,5 +525,32 @@ namespace source
{
return *m_body;
}
const char *print_binary_operator(const binary_operator operation)
{
switch (operation)
{
case binary_operator::sum:
return "+";
case binary_operator::subtraction:
return "-";
case binary_operator::multiplication:
return "*";
case binary_operator::division:
return "/";
case binary_operator::equals:
return "=";
case binary_operator::not_equals:
return "/=";
case binary_operator::less:
return "<";
case binary_operator::less_equal:
return "<=";
case binary_operator::greater:
return ">";
case binary_operator::greater_equal:
return ">=";
}
};
}
}