1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

Merge branch 'namelessblameless' into 'master'

CI match script names and remove dead code

See merge request OpenMW/openmw!4224
This commit is contained in:
psi29a 2024-07-05 08:11:14 +00:00
commit 6f327da8b5
2 changed files with 4 additions and 10 deletions

View File

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

View File

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