aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/parser.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-10-14 10:22:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-10-14 11:57:28 +0200
commit51aabbc8814c229e48c02836a32c402834c3425e (patch)
tree3130b9860661a38351d34237b4efeae89dcdb3f3 /libbuild2/parser.hxx
parent4ae6c2fe91d8dc5bdb7f6d9808b097dde8a8265f (diff)
Add ability to detect sole expansion in parser::parse_names()
Diffstat (limited to 'libbuild2/parser.hxx')
-rw-r--r--libbuild2/parser.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbuild2/parser.hxx b/libbuild2/parser.hxx
index 4cf52e9..0390e26 100644
--- a/libbuild2/parser.hxx
+++ b/libbuild2/parser.hxx
@@ -433,15 +433,16 @@ namespace build2
// those places. Still it may make sense to look into redesigning the
// whole thing one day.
//
- // Currently the only way for the result to be NULL or have a type is if
+ // Currently the only way for the result to be NULL or to have type is if
// it is the result of a sole, unquoted variable expansion, function call,
- // or context evaluation.
+ // or context evaluation. In these cases value is set to true.
//
// In the pre-parse mode no names are appended and the result is always
// {true, nullptr, nullopt}.
//
struct parse_names_result
{
+ bool value;
bool not_null;
const value_type* type;
optional<const target_type*> pattern;