Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2021-07-30 10:24:05 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-07-31 10:01:45 +0300
commit3fda1ba333e3ea3df3e50a4630f1d64128ab21c6 (patch)
tree79ec727d60e76981b88e5611a35f42b52d1f83e4 /src/GCodes/GCodeBuffer
parent84b2d4a1a6c8d97e5dc4844411c2e93af8218b8e (diff)
Tidied up ExpressionParser array parsing
Diffstat (limited to 'src/GCodes/GCodeBuffer')
-rw-r--r--src/GCodes/GCodeBuffer/ExpressionParser.cpp4
-rw-r--r--src/GCodes/GCodeBuffer/ExpressionParser.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/GCodes/GCodeBuffer/ExpressionParser.cpp b/src/GCodes/GCodeBuffer/ExpressionParser.cpp
index 60d5db79..f4419ad6 100644
--- a/src/GCodes/GCodeBuffer/ExpressionParser.cpp
+++ b/src/GCodes/GCodeBuffer/ExpressionParser.cpp
@@ -567,7 +567,7 @@ DriverId ExpressionParser::ParseDriverId() THROWS(GCodeException)
return val.GetDriverIdValue();
}
-void ExpressionParser::ParseArray(size_t& length, function_ref<void(size_t index)> processElement) THROWS(GCodeException)
+void ExpressionParser::ParseArray(size_t& length, function_ref<void(size_t index)> THROWS(GCodeException) processElement) THROWS(GCodeException)
{
size_t numElements = 0;
AdvancePointer(); // skip the '{'
@@ -575,7 +575,7 @@ void ExpressionParser::ParseArray(size_t& length, function_ref<void(size_t index
{
processElement(numElements);
++numElements;
- if (CurrentCharacter() != ',')
+ if (CurrentCharacter() != EXPRESSION_LIST_SEPARATOR)
{
break;
}
diff --git a/src/GCodes/GCodeBuffer/ExpressionParser.h b/src/GCodes/GCodeBuffer/ExpressionParser.h
index 25ad7470..80c1fe5a 100644
--- a/src/GCodes/GCodeBuffer/ExpressionParser.h
+++ b/src/GCodes/GCodeBuffer/ExpressionParser.h
@@ -49,7 +49,7 @@ private:
pre(readPointer >= 0; isalpha(gb.buffer[readPointer]));
void __attribute__((noinline)) ParseQuotedString(ExpressionValue& rslt) THROWS(GCodeException);
- void ParseArray(size_t& length, function_ref<void(size_t index)> processElement) THROWS(GCodeException);
+ void ParseArray(size_t& length, function_ref<void(size_t index)> THROWS(GCodeException) processElement) THROWS(GCodeException);
void GetVariableValue(ExpressionValue& rslt, const VariableSet *vars, const char *name, bool parameter, bool wantExists) THROWS(GCodeException);