From ea66709a853255c7957a8a7907fd21fa7f6cfd3f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Sep 2015 15:56:54 +0200 Subject: Add support for quoting directive names Now only unquoted, literal names are recognized as directives, for example: 'print' = abc print $print --- build/b.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'build/b.cxx') diff --git a/build/b.cxx b/build/b.cxx index bbfc635..665fac8 100644 --- a/build/b.cxx +++ b/build/b.cxx @@ -146,24 +146,24 @@ main (int argc, char* argv[]) lexer l (is, ""); token t (l.next ()); - if (t.type () == token_type::eos) + if (t.type == token_type::eos) continue; // Whitespace-only argument. // Unless this is a name followed by = or +=, assume it is // a start of the buildspec. // - if (t.type () != token_type::name) + if (t.type != token_type::name) break; - token_type tt (l.next ().type ()); + token_type tt (l.next ().type); if (tt != token_type::equal && tt != token_type::plus_equal) break; parser p; - t = p.parse_variable (l, *global_scope, t.name (), tt); + t = p.parse_variable (l, *global_scope, t.value, tt); - if (t.type () != token_type::eos) + if (t.type != token_type::eos) fail << "unexpected " << t << " in variable " << s; } -- cgit v1.1