A Hugo incarnation of the blog.
https://danilafe.com
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
445 B
21 lines
445 B
#include "binop.hpp"
|
|
|
|
std::string op_name(binop op) {
|
|
switch(op) {
|
|
case PLUS: return "+";
|
|
case MINUS: return "-";
|
|
case TIMES: return "*";
|
|
case DIVIDE: return "/";
|
|
}
|
|
return "??";
|
|
}
|
|
|
|
std::string op_action(binop op) {
|
|
switch(op) {
|
|
case PLUS: return "plus";
|
|
case MINUS: return "minus";
|
|
case TIMES: return "times";
|
|
case DIVIDE: return "divide";
|
|
}
|
|
return "??";
|
|
}
|
|
|