CommonCheck: Common functions used while checking for mistakes
This commit is contained in:
parent
454c349363
commit
0a57ef44f7
|
@ -0,0 +1,21 @@
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include "CommonCheck.h"
|
||||||
|
#include "tokenize.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
std::string FileLine(TOKEN *tok)
|
||||||
|
{
|
||||||
|
std::ostringstream ostr;
|
||||||
|
ostr << "[" << Files[tok->FileIndex] << ":" << tok->linenr << "]";
|
||||||
|
return ostr.str();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void ReportErr(const std::string errmsg)
|
||||||
|
{
|
||||||
|
std::cerr << errmsg << std::endl;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue