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;