Always print context for script warnings to remove the need for verbose option
(Fixes #2813)
This commit is contained in:
@@ -14,6 +14,9 @@ namespace Compiler
|
||||
else
|
||||
mStream << "warning ";
|
||||
|
||||
if (!mContext.empty())
|
||||
mStream << mContext << " ";
|
||||
|
||||
mStream
|
||||
<< "line " << loc.mLine+1 << ", column " << loc.mColumn+1
|
||||
<< " (" << loc.mLiteral << ")" << std::endl
|
||||
@@ -34,5 +37,10 @@ namespace Compiler
|
||||
<< " " << message << std::endl;
|
||||
}
|
||||
|
||||
void StreamErrorHandler::setContext(const std::string &context)
|
||||
{
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
StreamErrorHandler::StreamErrorHandler (std::ostream& ErrorStream) : mStream (ErrorStream) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user