From d3e30830061c5ee553292c225242e2bd47d0ad5b Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Mon, 1 Jul 2024 16:57:40 +0200 Subject: [PATCH] CI match script names and remove dead code --- components/compiler/fileparser.cpp | 11 ++++------- components/compiler/fileparser.hpp | 3 --- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/components/compiler/fileparser.cpp b/components/compiler/fileparser.cpp index d699f54ca4..ac0f28de10 100644 --- a/components/compiler/fileparser.cpp +++ b/components/compiler/fileparser.cpp @@ -1,5 +1,7 @@ #include "fileparser.hpp" +#include + #include "scanner.hpp" #include "tokenloc.hpp" @@ -12,11 +14,6 @@ namespace Compiler { } - std::string FileParser::getName() const - { - return mName; - } - Interpreter::Program FileParser::getProgram() const { return mScriptParser.getProgram(); @@ -39,7 +36,7 @@ namespace Compiler if (mState == EndNameState) { // optional repeated name after end statement - if (mName != name) + if (!Misc::StringUtils::ciEqual(mName, name)) reportWarning("Names for script " + mName + " do not match", loc); mState = EndCompleteState; @@ -79,7 +76,7 @@ namespace Compiler if (mState == EndNameState) { // optional repeated name after end statement - if (mName != loc.mLiteral) + if (!Misc::StringUtils::ciEqual(mName, loc.mLiteral)) reportWarning("Names for script " + mName + " do not match", loc); mState = EndCompleteState; diff --git a/components/compiler/fileparser.hpp b/components/compiler/fileparser.hpp index 19e82344fc..e2a7675330 100644 --- a/components/compiler/fileparser.hpp +++ b/components/compiler/fileparser.hpp @@ -28,9 +28,6 @@ namespace Compiler public: FileParser(ErrorHandler& errorHandler, Context& context); - std::string getName() const; - ///< Return script name. - Interpreter::Program getProgram() const; const Locals& getLocals() const;