aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/parser.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/parser.hxx')
-rw-r--r--libbuild2/parser.hxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/libbuild2/parser.hxx b/libbuild2/parser.hxx
index e199a9a..581ad1b 100644
--- a/libbuild2/parser.hxx
+++ b/libbuild2/parser.hxx
@@ -254,11 +254,6 @@ namespace build2
bool enter,
bool default_target);
- // If chunk is true, then parse the smallest but complete, name-wise,
- // chunk of input. Note that in this case you may still end up with
- // multiple names, for example, {foo bar} or $foo. In the pre-parse mode
- // always return empty list of names.
- //
// The what argument is used in diagnostics (e.g., "expected <what>
// instead of ...".
//
@@ -273,7 +268,21 @@ namespace build2
names
parse_names (token& t, token_type& tt,
pattern_mode pmode,
- bool chunk = false,
+ const char* what = "name",
+ const string* separators = &name_separators)
+ {
+ return parse_names (t, tt, pmode, false /* chunk */, what, separators);
+ }
+
+ // If chunk is true, then parse the smallest but complete, name-wise,
+ // chunk of input. Note that in this case you may still end up with
+ // multiple names, for example, {foo bar} or $foo. In the pre-parse mode
+ // always return empty list of names.
+ //
+ names
+ parse_names (token& t, token_type& tt,
+ pattern_mode pmode,
+ bool chunk,
const char* what = "name",
const string* separators = &name_separators)
{