added c_escape() in TokenDefinition module

This commit is contained in:
Josh Holtrop committed 2010-05-03 14:47:58 -04:00
1 parent c1070fb021
commit 21715a03c7
1 file changed
+12
+12
View File
@@ -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)
{