mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 22:06:45 +00:00
improved script check error messages
This commit is contained in:
parent
4e04131957
commit
2007a3e902
2 changed files with 4 additions and 1 deletions
|
@ -24,7 +24,8 @@ void CSMTools::ScriptCheckStage::report (const std::string& message, const Compi
|
||||||
stream << "warning ";
|
stream << "warning ";
|
||||||
|
|
||||||
stream
|
stream
|
||||||
<< "line " << loc.mLine << ", column " << loc.mColumn
|
<< "script " << mFile
|
||||||
|
<< ", line " << loc.mLine << ", column " << loc.mColumn
|
||||||
<< " (" << loc.mLiteral << "): " << message;
|
<< " (" << loc.mLiteral << "): " << message;
|
||||||
|
|
||||||
mMessages->push_back (stream.str());
|
mMessages->push_back (stream.str());
|
||||||
|
@ -74,6 +75,7 @@ void CSMTools::ScriptCheckStage::perform (int stage, std::vector<std::string>& m
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
mFile = mData.getScripts().getRecord (stage).get().mId;
|
||||||
std::istringstream input (mData.getScripts().getRecord (stage).get().mScriptText);
|
std::istringstream input (mData.getScripts().getRecord (stage).get().mScriptText);
|
||||||
|
|
||||||
Compiler::Scanner scanner (*this, input, mContext.getExtensions());
|
Compiler::Scanner scanner (*this, input, mContext.getExtensions());
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace CSMTools
|
||||||
Compiler::Extensions mExtensions;
|
Compiler::Extensions mExtensions;
|
||||||
CSMWorld::ScriptContext mContext;
|
CSMWorld::ScriptContext mContext;
|
||||||
std::string mId;
|
std::string mId;
|
||||||
|
std::string mFile;
|
||||||
std::vector<std::string> *mMessages;
|
std::vector<std::string> *mMessages;
|
||||||
|
|
||||||
virtual void report (const std::string& message, const Compiler::TokenLoc& loc, Type type);
|
virtual void report (const std::string& message, const Compiler::TokenLoc& loc, Type type);
|
||||||
|
|
Loading…
Reference in a new issue