aboutsummaryrefslogtreecommitdiff
path: root/build/file.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-09 15:56:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-09 15:56:54 +0200
commitea66709a853255c7957a8a7907fd21fa7f6cfd3f (patch)
tree061f828174b4a1d9d5c5fbc0b3b7427b5eea1ee8 /build/file.cxx
parent8a9870ed59225972de389b7b4a494a57390bff1b (diff)
Add support for quoting directive names
Now only unquoted, literal names are recognized as directives, for example: 'print' = abc print $print
Diffstat (limited to 'build/file.cxx')
-rw-r--r--build/file.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/build/file.cxx b/build/file.cxx
index f8f62f9..f6fdd10 100644
--- a/build/file.cxx
+++ b/build/file.cxx
@@ -274,8 +274,8 @@ namespace build
token t (lex.next ());
token_type tt;
- if (t.type () != token_type::name || t.name () != var ||
- ((tt = lex.next ().type ()) != token_type::equal &&
+ if (t.type != token_type::name || t.value != var ||
+ ((tt = lex.next ().type) != token_type::equal &&
tt != token_type::plus_equal))
{
error << "variable '" << var << "' expected as first line in " << rbf;
@@ -284,7 +284,7 @@ namespace build
parser p;
temp_scope tmp (*global_scope);
- p.parse_variable (lex, tmp, t.name (), tt);
+ p.parse_variable (lex, tmp, t.value, tt);
auto l (tmp.vars[var]);
assert (l.defined ());