summaryrefslogtreecommitdiffstats
path: root/src/parsers.cc
diff options
context:
space:
mode:
authorJeremy Apthorp <jeremya@chromium.org>2011-11-21 03:07:56 (GMT)
committerJeremy Apthorp <jeremya@chromium.org>2011-11-21 03:07:56 (GMT)
commitb363f6d8c456e24efb47b1b8d3c48f93c53ae5a4 (patch)
tree1b29c8b95739e427d3a073a106cf9ec27345cf8f /src/parsers.cc
parent73023f63f1539af51b3bbfc9d7233bc88bfe9b77 (diff)
downloadNinja-b363f6d8c456e24efb47b1b8d3c48f93c53ae5a4.zip
Ninja-b363f6d8c456e24efb47b1b8d3c48f93c53ae5a4.tar.gz
Ninja-b363f6d8c456e24efb47b1b8d3c48f93c53ae5a4.tar.bz2
Allow '$ ' to escape spaces in identifiers.
Diffstat (limited to 'src/parsers.cc')
-rw-r--r--src/parsers.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parsers.cc b/src/parsers.cc
index 4920496..97fa4a6 100644
--- a/src/parsers.cc
+++ b/src/parsers.cc
@@ -232,6 +232,9 @@ Token::Type Tokenizer::PeekToken() {
if (IsIdentChar(*cur_)) {
while (cur_ < end_ && IsIdentChar(*cur_)) {
+ if (*cur_ == '$' && cur_ + 1 < end_ && cur_[1] == ' ') {
+ ++cur_;
+ }
++cur_;
}
token_.end_ = cur_;