diff options
author | Evan Martin <martine@danga.com> | 2010-10-22 16:58:42 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2010-10-22 16:58:42 (GMT) |
commit | cee9fc7c2fc56c99d69078f0be956935b9b8d695 (patch) | |
tree | 0a7e708bf06cc8efe103789c15e6c233d36d90b0 /eval_env.h | |
parent | 3e4f03f1329d3af98fa708778fece9b5f847febb (diff) | |
download | Ninja-cee9fc7c2fc56c99d69078f0be956935b9b8d695.zip Ninja-cee9fc7c2fc56c99d69078f0be956935b9b8d695.tar.gz Ninja-cee9fc7c2fc56c99d69078f0be956935b9b8d695.tar.bz2 |
allow underscores in variable names
Diffstat (limited to 'eval_env.h')
-rw-r--r-- | eval_env.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -29,7 +29,8 @@ bool EvalString::Parse(const string& input) { parsed_.push_back(make_pair(input.substr(start, end - start), RAW)); start = end; for (end = start + 1; end < input.size(); ++end) { - if (!('a' <= input[end] && input[end] <= 'z')) + char c = input[end]; + if (!(('a' <= c && c <= 'z') || c == '_')) break; } if (end == start + 1) { |