improved script check error messages

actorid
Marc Zinnschlag 11 years ago
parent 4e04131957
commit 2007a3e902

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

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

Loading…
Cancel
Save