mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
Lexer: Added ::decomposeSubstitution and more flexible ::dequote
- ::dequote can now be given a string of valid quote characters, which defaults to '". - ::decomposeSubstitution properly parses the /from/to/g construct allowing for escaped characters (\/). - The 'g' at the end of a substitution is now considered to be a string of flag characters, which may contain 'g'. No other flag values are currently supported.
This commit is contained in:
parent
1c1422370a
commit
1bef45ff47
2 changed files with 41 additions and 6 deletions
|
@ -74,11 +74,12 @@ public:
|
|||
static bool isPunctuation (int);
|
||||
static bool isAllDigits (const std::string&);
|
||||
static bool isOneWord (const std::string&);
|
||||
static void dequote (std::string&);
|
||||
static void dequote (std::string&, const std::string& quotes = "'\"");
|
||||
static bool wasQuoted (const std::string&);
|
||||
static bool readWord (const std::string&, const std::string&, std::string::size_type&, std::string&);
|
||||
static bool readWord (const std::string&, std::string::size_type&, std::string&);
|
||||
static bool decomposePair (const std::string&, std::string&, std::string&, std::string&, std::string&);
|
||||
static bool decomposeSubstitution (const std::string&, std::string&, std::string&, std::string&);
|
||||
static int hexToInt (int);
|
||||
static int hexToInt (int, int);
|
||||
static int hexToInt (int, int, int, int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue