mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TW-1827: Extract annotations from a task
- Thanks to Ryan.
This commit is contained in:
parent
fdd55bc422
commit
5206b4a84b
7 changed files with 40 additions and 0 deletions
|
@ -1159,6 +1159,7 @@ bool Lexer::isOperator (std::string& token, Lexer::Type& type)
|
|||
// <date>.second
|
||||
//
|
||||
// Annotations (entry is a date):
|
||||
// annotations.count
|
||||
// annotations.<N>.entry
|
||||
// annotations.<N>.description
|
||||
//
|
||||
|
@ -1259,6 +1260,13 @@ bool Lexer::isDOM (std::string& token, Lexer::Type& type)
|
|||
if (isLiteral ("annotations", true, false) &&
|
||||
isLiteral (".", false, false))
|
||||
{
|
||||
if (isLiteral ("count", false, false))
|
||||
{
|
||||
token = _text.substr (marker, _cursor - marker);
|
||||
type = Lexer::Type::dom;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string extractedToken;
|
||||
Lexer::Type extractedType;
|
||||
if (isInteger (extractedToken, extractedType))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue