namespace tokenizer { TokenizerMethod tokenRules[] = { { "symbol", create_regex(operator_regex()), [](const ematch_result& match, token_list_t& list) { list.push_back(Token(token::type::symbol, estring(match[0]))); } }, { "number", create_regex("\\d+\\.\\d*"), [](const ematch_result& match, token_list_t& list) { list.push_back(Token(token::type::number, estring(match[0]))); } }, { "integer", create_regex("\\d+"), [](const ematch_result& match, token_list_t& list) { list.push_back(Token(token::type::integer, estring(match[0]))); } }, { "word", create_regex("\\w+"), [](const ematch_result& match, token_list_t& list) { list.push_back(Token(token::type::word, estring(match[0]))); } }, { "text", create_regex("\"([^\"]*)\""), [](const ematch_result& match, token_list_t& list) { list.push_back(Token(token::type::text, estring(match[1]))); } }, }; unsigned int tokenRulesSize = sizeof(tokenRules) / sizeof(TokenizerMethod); }
estring operator+(const std::string& lhs, const estring& rhs) { return estring(lhs) + rhs; }
estring operator+(const char* lhs, const estring& rhs) { return estring(lhs) + rhs; }
static estring _to_estring(T val) { return estring(std::to_string(val)); }
estring estring::transcode(std::string encoding) const { return estring(begin(), end(), encoding); }
// Build a message about a failed equality check std::string TestCase::notEqualsMessage (double expected, double actual) { return "expected: " + estring (expected) + " but was: " + estring (actual); }
// Build a message about a failed equality check std::string TestCase::notEqualsMessage (long expected, long actual) { return "expected: " + estring (expected) + " but was: " + estring (actual); }
// Build a message about a failed equality check std::string TestCase::notEqualsMessage(const void* expected, const void* actual) { return "expected: " + estring(expected) + " but was: " + estring(actual); }