From 333f468d264f0fa36a772b10b885fff6160ae4c7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 26 Sep 2019 12:29:56 +0200 Subject: Allow multiple `case` for single line/block --- libbuild2/parser.hxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libbuild2/parser.hxx') diff --git a/libbuild2/parser.hxx b/libbuild2/parser.hxx index 3014681..e199a9a 100644 --- a/libbuild2/parser.hxx +++ b/libbuild2/parser.hxx @@ -414,7 +414,7 @@ namespace build2 // Return true if the name token can be considered a directive keyword. // bool - keyword (token&); + keyword (const token&); // Buildspec. // @@ -472,6 +472,12 @@ namespace build2 token_type next_after_newline (token&, token_type&, char after = '\0'); + // As above but the after argument is assumed to be a name rather than + // a token (printed as is rather than quoted). + // + token_type + next_after_newline (token&, token_type&, const char* after); + // Be careful with peeking and switching the lexer mode. See keyword() // for more information. // -- cgit v1.1