bloglang/13/binop.hpp

22 lines
316 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,
DIVIDE,
MODULO,
EQUALS,
LESS_EQUALS,
2020-09-08 18:38:05 -07:00
};
constexpr binop all_binops[] = {
PLUS, MINUS, TIMES, DIVIDE, MODULO,
EQUALS, LESS_EQUALS
};
2020-09-08 18:38:05 -07:00
std::string op_name(binop op);
std::string op_action(binop op);