From 8d2e541ab1aa24140eb680fb046e49a4a3f0bbd2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 12 Oct 2016 14:51:27 +0200 Subject: Various design/implementation cleanups --- build2/parser | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'build2/parser') diff --git a/build2/parser b/build2/parser index cc28695..49bf59c 100644 --- a/build2/parser +++ b/build2/parser @@ -99,7 +99,7 @@ namespace build2 // Note: calls attributes_push() that the caller must pop. // value - variable_value (token&, token_type&); + variable_value (token&, token_type&, lexer_mode = lexer_mode::value); void variable_attributes (const variable_type&); @@ -178,7 +178,7 @@ namespace build2 : value (nullptr); } - // Return true if the parsed value is NOT NULL. + // Append names and return true if the parsed value is NOT NULL. // bool names (token& t, token_type& tt, names_type& ns, bool chunk = false) @@ -247,6 +247,12 @@ namespace build2 // Lexer. // protected: + location + get_location (const token& t) const + { + return build2::get_location (t, *path_); + } + token_type next (token&, token_type&); -- cgit v1.1