summaryrefslogtreecommitdiffstats
path: root/eval_env.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2010-10-22 16:58:42 (GMT)
committerEvan Martin <martine@danga.com>2010-10-22 16:58:42 (GMT)
commitcee9fc7c2fc56c99d69078f0be956935b9b8d695 (patch)
tree0a7e708bf06cc8efe103789c15e6c233d36d90b0 /eval_env.h
parent3e4f03f1329d3af98fa708778fece9b5f847febb (diff)
downloadNinja-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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval_env.h b/eval_env.h
index 695c28c..dfd091e 100644
--- a/eval_env.h
+++ b/eval_env.h
@@ -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) {