CommonCheck: Moved 'IsName' and 'IsNumber' from main.cpp

This commit is contained in:
Daniel Marjamäki 2007-05-25 06:45:47 +00:00
parent 997ae5f5b8
commit 909bf7e6cd
2 changed files with 17 additions and 0 deletions

View File

@ -19,3 +19,16 @@ void ReportErr(const std::string errmsg)
}
//---------------------------------------------------------------------------
bool IsName(const char str[])
{
return (str[0]=='_' || std::isalpha(str[0]));
}
//---------------------------------------------------------------------------
bool IsNumber(const char str[])
{
return std::isdigit(str[0]);
}
//---------------------------------------------------------------------------

View File

@ -11,5 +11,9 @@ std::string FileLine(TOKEN *tok);
void ReportErr(const std::string errmsg);
bool IsName(const char str[]);
bool IsNumber(const char str[]);
//---------------------------------------------------------------------------
#endif