| 55 | } // namespace |
| 56 | |
| 57 | const char* to_string(BuiltinOp op) { |
| 58 | const auto idx = static_cast<size_t>(op); |
| 59 | assert(idx < OP_INFO.size()); |
| 60 | return OP_INFO[idx].id_string; |
| 61 | } |
| 62 | |
| 63 | std::optional<BuiltinOp> builtin_op_from_string(std::string_view s) { |
| 64 | for (size_t i = 0; i < OP_INFO.size(); ++i) { |
no test coverage detected