aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/parser.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-09-26 12:29:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-09-30 15:30:22 +0200
commit333f468d264f0fa36a772b10b885fff6160ae4c7 (patch)
tree212479a6b793a0911a7de7d647173f66c04a411d /libbuild2/parser.hxx
parent70f5ab11c55ff4a43b32aafe21e839d050301215 (diff)
Allow multiple `case` for single line/block
Diffstat (limited to 'libbuild2/parser.hxx')
-rw-r--r--libbuild2/parser.hxx8
1 files changed, 7 insertions, 1 deletions
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.
//