CI match script names and remove dead code

pull/3236/head
Evil Eye 6 months ago
parent 3ebeaaa3bb
commit d3e3083006

@ -1,5 +1,7 @@
#include "fileparser.hpp"
#include <components/misc/strings/algorithm.hpp>
#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;

@ -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;

Loading…
Cancel
Save