MCPcopy Create free account
hub / github.com/bdring/FluidNC / read_command

Function read_command

FluidNC/src/Flowcontrol.cpp:70–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68};
69
70static 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
84static 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 };

Callers 1

flowcontrolFunction · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected