From d280946474568925016359be742b59fd6c000c52 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 3 Jun 2020 16:38:23 +0300 Subject: Properly handle diag directive in build script parser --- libbuild2/script/parser.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libbuild2/script/parser.hxx') diff --git a/libbuild2/script/parser.hxx b/libbuild2/script/parser.hxx index b15f632..bec6867 100644 --- a/libbuild2/script/parser.hxx +++ b/libbuild2/script/parser.hxx @@ -165,7 +165,8 @@ namespace build2 // Customization hooks. // protected: - // Parse the command's leading name chunk. + // Parse the command's leading name chunk. The argument first is true if + // this is the first command in the line. // // During the execution phase try to parse and translate the leading // names into the process path and return nullopt if choose not to do @@ -188,7 +189,7 @@ namespace build2 // recognize and execute certain directives, or some such. // virtual optional - parse_program (token&, token_type&, names&); + parse_program (token&, token_type&, bool first, names&); // Set lexer pointers for both the current and the base classes. // -- cgit v1.1