diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-07-09 10:50:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-07-09 10:50:42 +0200 |
commit | 101987533ca35e4aa3515b25415f1abba46e796f (patch) | |
tree | 076fcafb99a6d6c4d10b9eb1ad965d2b6748e260 /libbuild2/parser.cxx | |
parent | 932519463bca296054a3b5a8e07ad3505160a91b (diff) |
Add support for ad hoc importation
Diffstat (limited to 'libbuild2/parser.cxx')
-rw-r--r-- | libbuild2/parser.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index b6004de..bdac7cb 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -2625,16 +2625,21 @@ namespace build2 } // The rest should be a list of projects and/or targets. Parse them as - // names to get variable expansion and directory prefixes. Note: doesn't - // make sense to expand patterns (what's the base directory?) + // names to get variable expansion and directory prefixes. + // + // Note: that we expant patterns for the ad hoc import case: + // + // import sub = */ // const location l (get_location (t)); names ns (tt != type::newline && tt != type::eos - ? parse_names (t, tt, pattern_mode::ignore) + ? parse_names (t, tt, pattern_mode::expand) : names ()); for (name& n: ns) { + // @@ Could this be an out-qualified ad hoc import? + // if (n.pair) fail (l) << "unexpected pair in import"; |