Expressions
- Added recognition of individial words to the tokenize method.
This commit is contained in:
@@ -150,7 +150,7 @@ void Arguments::capture (int argc, const char** argv)
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < argc; ++i)
|
for (int i = 0; i < argc; ++i)
|
||||||
{
|
{
|
||||||
// The "i != 0" guarantees that argv[0] does not get split, because it may
|
// The "i &&" guarantees that argv[0] does not get split, because it may
|
||||||
// be an absolute path, and Expression::expand_tokens would make a dog's
|
// be an absolute path, and Expression::expand_tokens would make a dog's
|
||||||
// dinner out of it.
|
// dinner out of it.
|
||||||
std::vector <std::string> parts;
|
std::vector <std::string> parts;
|
||||||
|
|||||||
@@ -647,6 +647,9 @@ void Expression::tokenize (
|
|||||||
else if (n.getDate (date_format, t))
|
else if (n.getDate (date_format, t))
|
||||||
tokens.push_back (Triple (Date (t).toString (date_format), "date", category));
|
tokens.push_back (Triple (Date (t).toString (date_format), "date", category));
|
||||||
|
|
||||||
|
else if (n.getWord (s))
|
||||||
|
tokens.push_back (Triple (s, "rvalue", category));
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! n.getUntilWS (s))
|
if (! n.getUntilWS (s))
|
||||||
|
|||||||
Reference in New Issue
Block a user