mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Lexer
- Implemented Lexer::word, which is just like ::token, but does not understand dates, durations or operators. - Implemented Lexer::split, which uses Lexer::word. - Added unit tests.
This commit is contained in:
parent
d099a4edfd
commit
611812007a
3 changed files with 314 additions and 3 deletions
|
@ -58,10 +58,12 @@ public:
|
|||
Lexer& operator= (const Lexer&); // Not implemented.
|
||||
bool operator== (const Lexer&); // Not implemented.
|
||||
bool token (std::string&, Type&);
|
||||
bool word (std::string&, Type&);
|
||||
void ambiguity (bool);
|
||||
|
||||
static const std::string type_name (const Type&);
|
||||
static bool is_ws (int);
|
||||
static void split (std::vector <std::string>&, const std::string&);
|
||||
|
||||
private:
|
||||
bool is_punct (int) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue