CommonCheck: Common functions used while checking for mistakes

This commit is contained in:
Daniel Marjamäki 2007-05-24 13:09:23 +00:00
parent 454c349363
commit 0a57ef44f7
1 changed files with 21 additions and 0 deletions

21
CommonCheck.cpp Normal file
View File

@ -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;
}
//---------------------------------------------------------------------------