mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-25 21:27:19 +02:00
Nibbler: Removed unused ::skipRx method
This commit is contained in:
parent
ad26d98d0f
commit
180d3e75ff
3 changed files with 0 additions and 41 deletions
|
@ -762,33 +762,6 @@ bool Nibbler::skipWS ()
|
|||
return this->skipAllOneOf (" \t\n\r\f");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef NIBBLER_FEATURE_REGEX
|
||||
bool Nibbler::skipRx (const std::string& regex)
|
||||
{
|
||||
if (_cursor < _length)
|
||||
{
|
||||
// Regex may be anchored to the beginning and include capturing parentheses,
|
||||
// otherwise they are added.
|
||||
std::string modified_regex;
|
||||
if (regex.substr (0, 2) != "^(")
|
||||
modified_regex = "^(" + regex + ")";
|
||||
else
|
||||
modified_regex = regex;
|
||||
|
||||
RX r (modified_regex, true);
|
||||
std::vector <std::string> results;
|
||||
if (r.match (results, _input->substr (_cursor)))
|
||||
{
|
||||
_cursor += results[0].length ();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::backN (const int quantity /*= 1*/)
|
||||
{
|
||||
|
|
|
@ -80,9 +80,6 @@ public:
|
|||
bool skipAll (char);
|
||||
bool skipAllOneOf (const std::string&);
|
||||
bool skipWS ();
|
||||
#ifdef NIBBLER_FEATURE_REGEX
|
||||
bool skipRx (const std::string&);
|
||||
#endif
|
||||
|
||||
bool backN (const int quantity = 1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue