mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 22:33:08 +02:00
Nibbler: Dead code removal
This commit is contained in:
parent
9177c5b697
commit
a89c996334
2 changed files with 0 additions and 69 deletions
|
@ -507,74 +507,6 @@ bool Nibbler::getNumber (double &result)
|
||||||
return isnumber;
|
return isnumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// number:
|
|
||||||
// int frac? exp?
|
|
||||||
//
|
|
||||||
// int:
|
|
||||||
// digit+
|
|
||||||
//
|
|
||||||
// frac:
|
|
||||||
// . digit+
|
|
||||||
//
|
|
||||||
// exp:
|
|
||||||
// e digit+
|
|
||||||
//
|
|
||||||
// e:
|
|
||||||
// e|E (+|-)?
|
|
||||||
//
|
|
||||||
bool Nibbler::getUnsignedNumber (double& result)
|
|
||||||
{
|
|
||||||
auto i = _cursor;
|
|
||||||
|
|
||||||
// digit+
|
|
||||||
if (i < _length && Lexer::isDigit (_input[i]))
|
|
||||||
{
|
|
||||||
++i;
|
|
||||||
|
|
||||||
while (i < _length && Lexer::isDigit (_input[i]))
|
|
||||||
++i;
|
|
||||||
|
|
||||||
// ( . digit+ )?
|
|
||||||
if (i < _length && _input[i] == '.')
|
|
||||||
{
|
|
||||||
++i;
|
|
||||||
|
|
||||||
while (i < _length && Lexer::isDigit (_input[i]))
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ( [eE] [+-]? digit+ )?
|
|
||||||
if (i < _length && (_input[i] == 'e' || _input[i] == 'E'))
|
|
||||||
{
|
|
||||||
++i;
|
|
||||||
|
|
||||||
if (i < _length && (_input[i] == '+' || _input[i] == '-'))
|
|
||||||
++i;
|
|
||||||
|
|
||||||
if (i < _length && Lexer::isDigit (_input[i]))
|
|
||||||
{
|
|
||||||
++i;
|
|
||||||
|
|
||||||
while (i < _length && Lexer::isDigit (_input[i]))
|
|
||||||
++i;
|
|
||||||
|
|
||||||
result = strtof (_input.substr (_cursor, i - _cursor).c_str (), NULL);
|
|
||||||
_cursor = i;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = strtof (_input.substr (_cursor, i - _cursor).c_str (), NULL);
|
|
||||||
_cursor = i;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Nibbler::getLiteral (const std::string& literal)
|
bool Nibbler::getLiteral (const std::string& literal)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,6 @@ public:
|
||||||
bool getUnsignedInt (int&);
|
bool getUnsignedInt (int&);
|
||||||
bool getNumber (std::string&);
|
bool getNumber (std::string&);
|
||||||
bool getNumber (double&);
|
bool getNumber (double&);
|
||||||
bool getUnsignedNumber (double&);
|
|
||||||
bool getLiteral (const std::string&);
|
bool getLiteral (const std::string&);
|
||||||
#ifdef NIBBLER_FEATURE_REGEX
|
#ifdef NIBBLER_FEATURE_REGEX
|
||||||
bool getRx (const std::string&, std::string&);
|
bool getRx (const std::string&, std::string&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue