aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/lexer.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-05-26 13:10:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 08:40:59 +0200
commit57e2aaa28e19da1cd4e51982f46ef2630739ff8a (patch)
tree138a169b29aad630150906ffb4a8f30a5f9bdf5a /libbuild2/build/script/lexer.cxx
parent29c59165396eb842d92367fca74c4e459ea25900 (diff)
Wrap up $<, $> variables and related ($target.path(), hashing, cleanup)
Diffstat (limited to 'libbuild2/build/script/lexer.cxx')
-rw-r--r--libbuild2/build/script/lexer.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/libbuild2/build/script/lexer.cxx b/libbuild2/build/script/lexer.cxx
index 716d898..f5a7333 100644
--- a/libbuild2/build/script/lexer.cxx
+++ b/libbuild2/build/script/lexer.cxx
@@ -242,14 +242,19 @@ namespace build2
{
lexer_mode m (st.mode);
- // Customized implementation that handles special variable names ($>).
+ // Customized implementation that handles special variable names ($>,
+ // $<).
+ //
+ // @@ TODO: $(<), $(>): feels like this will have to somehow be
+ // handled at the top-level lexer level. Maybe provide a
+ // string of one-char special variable names as state::data?
//
if (m != lexer_mode::variable)
return base_lexer::word (st, sep);
xchar c (peek ());
- if (c != '>')
+ if (c != '>' && c != '<')
return base_lexer::word (st, sep);
get ();