diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-26 10:01:32 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-26 10:01:32 +0200 |
commit | 97e00dccb4a9d3abc3c896b33560ed6aed0a1763 (patch) | |
tree | bd17e1fc480ea56232a0b4c6f22bb691bc61ee1d /libbuild2/scope.hxx | |
parent | 8e0e8edb727a5367d991880b033eb13060f4c8eb (diff) |
Factor target name processing code from parser to scope
Diffstat (limited to 'libbuild2/scope.hxx')
-rw-r--r-- | libbuild2/scope.hxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libbuild2/scope.hxx b/libbuild2/scope.hxx index 08eb06b..b29a981 100644 --- a/libbuild2/scope.hxx +++ b/libbuild2/scope.hxx @@ -248,6 +248,27 @@ namespace build2 pair<const target_type*, optional<string>> find_target_type (name&, const location&) const; + // As above but process the potentially out-qualified target name further + // by completing (relative to this scope) and normalizing the directories + // and also issuing appropriate diagnostics if the target type is unknown. + // If the first argument has the pair flag true, then the second should be + // the out directory. + // + pair<const target_type&, optional<string>> + find_target_type (name&, name&, const location&) const; + + // As above, but return the result as a target key (with its members + // shallow-pointing to processed parts in the two names). + // + target_key + find_target_key (name&, name&, const location&) const; + + // As above, but the names are passed as a vector. Issue appropriate + // diagnostics if the wrong number of names is passed. + // + target_key + find_target_key (names&, const location&) const; + // Dynamically derive a new target type from an existing one. Return the // reference to the target type and an indicator of whether it was // actually created. |