Skip to content
Snippets Groups Projects
Commit 4a784814 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

Add TODOs for getTokens() to known places that scan command lines.

Lacking time to properly test new LLStringUtil::getTokens() against the
present (different!) command-line scanners in LLExternalEditor::tokenize() and
LLCommandLineParser::parseCommandLineString(), just annotate as future work
the goal of unifying them... SIGH.
parent bf7c2156
No related branches found
No related tags found
No related merge requests found
...@@ -342,6 +342,15 @@ bool LLCommandLineParser::parseCommandLine(int argc, char **argv) ...@@ -342,6 +342,15 @@ bool LLCommandLineParser::parseCommandLine(int argc, char **argv)
return parseAndStoreResults(clp); return parseAndStoreResults(clp);
} }
// TODO:
// - Break out this funky parsing logic into separate method
// - Unit-test it with tests like LLStringUtil::getTokens() (the command-line
// overload that supports quoted tokens)
// - Unless this logic offers significant semantic benefits, replace it with
// LLStringUtil::getTokens(). This would fix a known bug: you cannot --set a
// string-valued variable to the empty string, because empty strings are
// eliminated below.
bool LLCommandLineParser::parseCommandLineString(const std::string& str) bool LLCommandLineParser::parseCommandLineString(const std::string& str)
{ {
// Split the string content into tokens // Split the string content into tokens
......
...@@ -119,6 +119,12 @@ std::string LLExternalEditor::getErrorMessage(EErrorCode code) ...@@ -119,6 +119,12 @@ std::string LLExternalEditor::getErrorMessage(EErrorCode code)
return LLTrans::getString("Unknown"); return LLTrans::getString("Unknown");
} }
// TODO:
// - Unit-test this with tests like LLStringUtil::getTokens() (the
// command-line overload that supports quoted tokens)
// - Unless there are significant semantic differences, eliminate this method
// and use LLStringUtil::getTokens() instead.
// static // static
size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str) size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment