blog-static/code/compiler/13/binop.hpp

18 lines
241 B
C++
Raw Normal View History

2020-09-08 18:38:05 -07:00
#pragma once
#include <array>
2020-09-08 18:38:05 -07:00
#include <string>
enum binop {
PLUS,
MINUS,
TIMES,
2020-09-17 20:14:39 -07:00
DIVIDE
2020-09-08 18:38:05 -07:00
};
constexpr binop all_binops[] = {
2020-09-17 20:14:39 -07:00
PLUS, MINUS, TIMES, DIVIDE
};
2020-09-08 18:38:05 -07:00
std::string op_name(binop op);
std::string op_action(binop op);