diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-01-16 15:32:00 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-01-16 15:32:00 +0200 |
commit | 47751abc43dab40e0ac4a1523994fd533e6a3b22 (patch) | |
tree | bb61a346538ddb6945e8aff4c3919ce002c55a89 /build/parser | |
parent | c106259517d7693ea8e24564bc890fe575d5edcd (diff) |
Add support for directory prefixes
For example:
cxx{driver ../{foo bar}}
cxx{driver} ../cxx{foo bar}
Diffstat (limited to 'build/parser')
-rw-r--r-- | build/parser | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/build/parser b/build/parser index e8e7314..66c0357 100644 --- a/build/parser +++ b/build/parser @@ -39,10 +39,11 @@ namespace build private: struct name_type { - name_type (std::string t, std::string n) - : type (std::move (t)), name (std::move (n)) {} + name_type (std::string t, path d, std::string n) + : type (std::move (t)), dir (std::move (d)), name (std::move (n)) {} std::string type; // Empty if untyped. + path dir; std::string name; }; @@ -55,12 +56,13 @@ namespace build parse_names (token& t, token_type& tt) { names ns; - parse_names (t, tt, ns, nullptr); + parse_names (t, tt, ns, nullptr, nullptr); return ns; } void - parse_names (token&, token_type&, names&, const std::string* type); + parse_names (token&, token_type&, names&, + const path* dir, const std::string* type); // Utilities. // |