mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Parser
- Added alias collection methods.
This commit is contained in:
parent
468da9dcde
commit
6145869f43
2 changed files with 8 additions and 0 deletions
|
@ -187,6 +187,12 @@ Tree* Parser::parse ()
|
||||||
return _tree;
|
return _tree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
void Parser::alias (const std::string& name, const std::string& value)
|
||||||
|
{
|
||||||
|
_aliases.insert (std::pair <std::string, std::string> (name, value));
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Parser::entity (const std::string& name, const std::string& value)
|
void Parser::entity (const std::string& name, const std::string& value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,6 +42,7 @@ public:
|
||||||
void appendStdin ();
|
void appendStdin ();
|
||||||
Tree* tree ();
|
Tree* tree ();
|
||||||
Tree* parse ();
|
Tree* parse ();
|
||||||
|
void alias (const std::string&, const std::string&);
|
||||||
void entity (const std::string&, const std::string&);
|
void entity (const std::string&, const std::string&);
|
||||||
bool exactMatch (const std::string&, const std::string&) const;
|
bool exactMatch (const std::string&, const std::string&) const;
|
||||||
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
||||||
|
@ -85,6 +86,7 @@ private:
|
||||||
private:
|
private:
|
||||||
Tree* _tree;
|
Tree* _tree;
|
||||||
std::multimap <std::string, std::string> _entities;
|
std::multimap <std::string, std::string> _entities;
|
||||||
|
std::map <std::string, std::string> _aliases;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue