1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-03 06:45:33 +00:00

improved script check error messages

This commit is contained in:
Marc Zinnschlag 2014-02-15 13:25:38 +01:00
parent 4e04131957
commit 2007a3e902
2 changed files with 4 additions and 1 deletions

View file

@ -24,7 +24,8 @@ void CSMTools::ScriptCheckStage::report (const std::string& message, const Compi
stream << "warning ";
stream
<< "line " << loc.mLine << ", column " << loc.mColumn
<< "script " << mFile
<< ", line " << loc.mLine << ", column " << loc.mColumn
<< " (" << loc.mLiteral << "): " << message;
mMessages->push_back (stream.str());
@ -74,6 +75,7 @@ void CSMTools::ScriptCheckStage::perform (int stage, std::vector<std::string>& m
try
{
mFile = mData.getScripts().getRecord (stage).get().mId;
std::istringstream input (mData.getScripts().getRecord (stage).get().mScriptText);
Compiler::Scanner scanner (*this, input, mContext.getExtensions());

View file

@ -17,6 +17,7 @@ namespace CSMTools
Compiler::Extensions mExtensions;
CSMWorld::ScriptContext mContext;
std::string mId;
std::string mFile;
std::vector<std::string> *mMessages;
virtual void report (const std::string& message, const Compiler::TokenLoc& loc, Type type);