Skip to content

Commit

Permalink
Flow control (#1296)
Browse files Browse the repository at this point in the history
* If else endif is working; nothing else has been tested

* Cleanups

* Loops work

* PRINT, and DEBUG,

* Complain about undefined parameters

* Lots of error messages

* Skip prints inside non-executed IF clauses

* Fixed EXISTS bug with global named parameters

* Fixed WebUI bugs with system parameters
  • Loading branch information
MitchBradley authored Aug 16, 2024
1 parent ea4890a commit b1526e3
Show file tree
Hide file tree
Showing 18 changed files with 892 additions and 313 deletions.
Binary file modified FluidNC/data/index.html.gz
Binary file not shown.
6 changes: 4 additions & 2 deletions FluidNC/src/Channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ class Channel : public Stream {

size_t lineNumber() { return _line_number; }

virtual void save() {}
virtual void restore() {}
virtual void save() {}
virtual void restore() {}
virtual size_t position() { return 0; }
virtual void set_position(size_t pos) {}
};
5 changes: 5 additions & 0 deletions FluidNC/src/Error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,9 @@ const std::map<Error, const char*> ErrorNames = {
{ Error::ExpressionUnknownOp, "Expression Unknown Operator" },
{ Error::ExpressionArgumentOutOfRange, "Expression Argument Out of Range" },
{ Error::ExpressionSyntaxError, "Expression Syntax Error" },
{ Error::FlowControlSyntaxError, "Flow Control Syntax Error" },
{ Error::FlowControlNotExecutingMacro, "Flow Control Not Executing Macro" },
{ Error::FlowControlOutOfMemory, "Flow Control Out of Memory" },
{ Error::FlowControlStackOverflow, "Flow Control Stack Overflow" },
{ Error::ParameterAssignmentFailed, "Parameter Assignment Failed" },
};
5 changes: 5 additions & 0 deletions FluidNC/src/Error.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ enum class Error : uint8_t {
ExpressionUnknownOp = 173,
ExpressionArgumentOutOfRange = 174,
ExpressionSyntaxError = 175,
FlowControlSyntaxError = 176,
FlowControlNotExecutingMacro = 177,
FlowControlOutOfMemory = 178,
FlowControlStackOverflow = 179,
ParameterAssignmentFailed = 180,
};

const char* errorString(Error errorNumber);
Expand Down
Loading

0 comments on commit b1526e3

Please sign in to comment.