mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Removed obsolete Nibbler::getDOM.
This commit is contained in:
parent
9bf1ec2f7c
commit
fde7ec107a
3 changed files with 1 additions and 108 deletions
|
@ -934,83 +934,6 @@ bool Nibbler::getOneOf (
|
|||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// [<number>|<uuid>|<word>|].<word>[.<word> ...]
|
||||
//
|
||||
// TODO Obsolete
|
||||
bool Nibbler::getDOM (std::string& result)
|
||||
{
|
||||
std::string::size_type i = mCursor;
|
||||
if (i < mLength)
|
||||
{
|
||||
save ();
|
||||
|
||||
std::string left;
|
||||
std::string right;
|
||||
int number;
|
||||
|
||||
// <name>.<name>[.<name> ...]
|
||||
if (getName (left) &&
|
||||
skip ('.') &&
|
||||
getName (right))
|
||||
{
|
||||
while (skip ('.') &&
|
||||
getWord (right))
|
||||
;
|
||||
|
||||
result = mInput.substr (i, mCursor - i);
|
||||
return true;
|
||||
}
|
||||
|
||||
restore ();
|
||||
|
||||
// <id>.<name>[.<name> ...]
|
||||
if (getInt (number) &&
|
||||
skip ('.') &&
|
||||
getName (right))
|
||||
{
|
||||
while (skip ('.') &&
|
||||
getWord (right))
|
||||
;
|
||||
|
||||
result = mInput.substr (i, mCursor - i);
|
||||
return true;
|
||||
}
|
||||
|
||||
restore ();
|
||||
|
||||
// <uuid>.<name>[.<name> ...]
|
||||
if (getUUID (left) &&
|
||||
skip ('.') &&
|
||||
getName (right))
|
||||
{
|
||||
while (skip ('.') &&
|
||||
getWord (right))
|
||||
;
|
||||
|
||||
result = mInput.substr (i, mCursor - i);
|
||||
return true;
|
||||
}
|
||||
|
||||
restore ();
|
||||
|
||||
// <name>[.<name> ...]
|
||||
if (getName (right))
|
||||
{
|
||||
while (skip ('.') &&
|
||||
getWord (right))
|
||||
;
|
||||
|
||||
result = mInput.substr (i, mCursor - i);
|
||||
return true;
|
||||
}
|
||||
|
||||
restore ();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// A name is a string of alpha-numeric characters.
|
||||
bool Nibbler::getName (std::string& result)
|
||||
|
|
|
@ -66,7 +66,6 @@ public:
|
|||
bool getDateISO (time_t&);
|
||||
bool getDate (const std::string&, time_t&);
|
||||
bool getOneOf (const std::vector <std::string>&, std::string&);
|
||||
bool getDOM (std::string&);
|
||||
bool getName (std::string&);
|
||||
bool getWord (std::string&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue