Expressions

- Added recognition of individial words to the tokenize method.
This commit is contained in:
Paul Beckingham 2011-07-18 23:35:35 -04:00
parent ab6e230f10
commit e564827be7
2 changed files with 4 additions and 1 deletions

View file

@ -150,7 +150,7 @@ void Arguments::capture (int argc, const char** argv)
{
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
// dinner out of it.
std::vector <std::string> parts;

View file

@ -647,6 +647,9 @@ void Expression::tokenize (
else if (n.getDate (date_format, t))
tokens.push_back (Triple (Date (t).toString (date_format), "date", category));
else if (n.getWord (s))
tokens.push_back (Triple (s, "rvalue", category));
else
{
if (! n.getUntilWS (s))