mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Lexer: Implemented ::readWord
- Lexer::readWord is a general-purpose text parser, for finding plain words and quoted strings. It supports \uNNNN and U+NNNN unicode sequences, and general escapes, \t, \', \" etc.
This commit is contained in:
parent
26e6dd2131
commit
d82da280cb
2 changed files with 100 additions and 8 deletions
10
src/Lexer.h
10
src/Lexer.h
|
@ -75,13 +75,13 @@ public:
|
|||
static bool isOneWord (const std::string&);
|
||||
static void dequote (std::string&);
|
||||
static bool wasQuoted (const std::string&);
|
||||
static bool readWord (const std::string&, const std::string&, std::string::size_type&, std::string&);
|
||||
static bool decomposePair (const std::string&, std::string&, std::string&, std::string&, std::string&);
|
||||
static int hexToInt (int);
|
||||
static int hexToInt (int, int);
|
||||
static int hexToInt (int, int, int, int);
|
||||
|
||||
// Helpers.
|
||||
bool isEOS () const;
|
||||
int hexToInt (int) const;
|
||||
int hexToInt (int, int) const;
|
||||
int hexToInt (int, int, int, int) const;
|
||||
bool isEOS () const;
|
||||
|
||||
// Stream Classifiers.
|
||||
bool isString (std::string&, Lexer::Type&, int quote);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue