added c_escape() in TokenDefinition module
This commit is contained in:
1 parent
c1070fb021
commit
21715a03c7
1 file changed
+12
@@ -8,6 +8,18 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
static string c_escape(const string & orig)
|
||||
{
|
||||
string result;
|
||||
for (string::const_iterator it = orig.begin(); it != orig.end(); it++)
|
||||
{
|
||||
if (*it == '\\')
|
||||
result += '\\';
|
||||
result += *it;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool TokenDefinition::create(const string & name,
|
||||
const string & definition, const string & flags)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user