Merge branch 'namelessblameless' into 'master'

CI match script names and remove dead code

See merge request OpenMW/openmw!4224
pull/3236/head
psi29a 6 months ago
commit 6f327da8b5

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