Always print context for script warnings to remove the need for verbose option

(Fixes #2813)
This commit is contained in:
scrawl
2017-02-21 04:32:59 +01:00
parent 9728a6967e
commit 3f27c8cc97
9 changed files with 24 additions and 32 deletions
@@ -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) {}
}