aboutsummaryrefslogtreecommitdiff
path: root/build/lexer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/lexer.cxx')
-rw-r--r--build/lexer.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/lexer.cxx b/build/lexer.cxx
index 79611c6..77e803c 100644
--- a/build/lexer.cxx
+++ b/build/lexer.cxx
@@ -17,6 +17,16 @@ namespace build
return t;
}
+ pair<char, bool> lexer::
+ peek_char ()
+ {
+ // In the quoted mode we don't skip spaces.
+ //
+ sep_ = mode_.top () != lexer_mode::quoted && skip_spaces ();
+ xchar c (peek ());
+ return make_pair (eos (c) ? '\0' : char (c), sep_);
+ }
+
token lexer::
next_impl ()
{
@@ -385,6 +395,9 @@ namespace build
get ();
}
+ r = r || sep_;
+ sep_ = false;
+
return r;
}