| 68 | }; |
| 69 | |
| 70 | static Error read_command(const char* line, size_t& pos, ngc_cmd_t& operation) { |
| 71 | size_t start = pos; |
| 72 | while (isalpha(line[pos])) { |
| 73 | ++pos; |
| 74 | } |
| 75 | std::string_view key(line + start, pos - start); |
| 76 | auto it = commands.find(key); |
| 77 | if (it == commands.end()) { |
| 78 | return Error::FlowControlSyntaxError; |
| 79 | } |
| 80 | operation = it->second; |
| 81 | return Error::Ok; |
| 82 | } |
| 83 | |
| 84 | static Error stack_push(uint32_t o_label, ngc_cmd_t operation, bool skip) { |
| 85 | ngc_stack_entry_t ent = { o_label, operation, Job::source(), 0, 0, "", 0, skip, false, false }; |
no test coverage detected