From 87466bfbbb8ed851519bb9f2ccb1cbbc7cc696c4 Mon Sep 17 00:00:00 2001 From: David Crocker Date: Fri, 30 Jul 2021 08:18:13 +0100 Subject: Reverted ExpressionParser files --- src/GCodes/GCodeBuffer/ExpressionParser.cpp | 6 ++---- src/GCodes/GCodeBuffer/ExpressionParser.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/GCodes/GCodeBuffer/ExpressionParser.cpp b/src/GCodes/GCodeBuffer/ExpressionParser.cpp index 0c65a39c..60d5db79 100644 --- a/src/GCodes/GCodeBuffer/ExpressionParser.cpp +++ b/src/GCodes/GCodeBuffer/ExpressionParser.cpp @@ -812,12 +812,10 @@ void ExpressionParser::SkipWhiteSpace() noexcept } } -void ExpressionParser::CheckForExtraCharacters(bool isArrayExpression) THROWS(GCodeException) +void ExpressionParser::CheckForExtraCharacters() THROWS(GCodeException) { SkipWhiteSpace(); - - char c = CurrentCharacter(); - if (c != 0 && (!isArrayExpression || (c != EXPRESSION_LIST_SEPARATOR && c != LIST_SEPARATOR))) + if (CurrentCharacter() != 0) { ThrowParseException("Unexpected characters after expression"); } diff --git a/src/GCodes/GCodeBuffer/ExpressionParser.h b/src/GCodes/GCodeBuffer/ExpressionParser.h index adfff7c7..25ad7470 100644 --- a/src/GCodes/GCodeBuffer/ExpressionParser.h +++ b/src/GCodes/GCodeBuffer/ExpressionParser.h @@ -33,7 +33,7 @@ public: void ParseDriverIdArray(DriverId arr[], size_t& length) THROWS(GCodeException); void SkipWhiteSpace() noexcept; - void CheckForExtraCharacters(bool isArrayExpression = false) THROWS(GCodeException); + void CheckForExtraCharacters() THROWS(GCodeException); const char *GetEndptr() const noexcept { return currentp; } private: -- cgit v1.2.3