From fa6f9986dd73627643469c238b32dd92607f5214 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 9 Mar 2015 09:45:25 +0200 Subject: Add support for skipping already loaded/included buildfiles at top level The idea is that a buildfile shall be included/loaded only once for any given out_root. --- build/parser | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'build/parser') diff --git a/build/parser b/build/parser index 25866bc..50e306d 100644 --- a/build/parser +++ b/build/parser @@ -7,7 +7,6 @@ #include #include -#include #include #include @@ -29,7 +28,7 @@ namespace build // Issue diagnostics and throw failed in case of an error. // void - parse_buildfile (std::istream&, const path&, scope&); + parse_buildfile (std::istream&, const path&, scope& base, scope& root); buildspec parse_buildspec (std::istream&, const std::string& name); @@ -99,7 +98,8 @@ namespace build private: const std::string* path_; // Path processed by diagnostic_string(). lexer* lexer_; - scope* scope_; + scope* scope_; // Current base scope (out_base). + scope* root_; // Current root scope (out_root). target* default_target_; const path* out_root_; @@ -107,8 +107,6 @@ namespace build token peek_ {token_type::eos, false, 0, 0}; bool peeked_ {false}; - - std::unordered_set include_; }; } -- cgit v1.1