aboutsummaryrefslogtreecommitdiff
path: root/build/parser
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-03-09 09:45:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-03-09 09:45:25 +0200
commitfa6f9986dd73627643469c238b32dd92607f5214 (patch)
treede7ee1f4253ab815767b45c9ec0b03d802d01704 /build/parser
parent2e98d3ec3aa57c7b1776d3bf5e7e219a9a3cb3af (diff)
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.
Diffstat (limited to 'build/parser')
-rw-r--r--build/parser8
1 files changed, 3 insertions, 5 deletions
diff --git a/build/parser b/build/parser
index 25866bc..50e306d 100644
--- a/build/parser
+++ b/build/parser
@@ -7,7 +7,6 @@
#include <string>
#include <iosfwd>
-#include <unordered_set>
#include <build/path>
#include <build/token>
@@ -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<path> include_;
};
}