aboutsummaryrefslogtreecommitdiff
path: root/build/parser
diff options
context:
space:
mode:
Diffstat (limited to 'build/parser')
-rw-r--r--build/parser9
1 files changed, 7 insertions, 2 deletions
diff --git a/build/parser b/build/parser
index 08d587a..4630110 100644
--- a/build/parser
+++ b/build/parser
@@ -27,7 +27,10 @@ namespace build
typedef build::names names_type;
typedef build::variable variable_type;
- parser (): fail (&path_) {}
+ // If boot is true, then we are parsing bootstrap.build and modules
+ // should only be bootstrapped.
+ //
+ parser (bool boot = false): fail (&path_), boot_ (boot) {}
// Issue diagnostics and throw failed in case of an error.
//
@@ -183,7 +186,9 @@ namespace build
const fail_mark<failed> fail;
protected:
- const std::string* path_; // Path processed by diag_relative().
+ bool boot_;
+
+ const std::string* path_; // Path processed by diag_relative() and pooled.
lexer* lexer_;
target* target_; // Current target, if any.
scope* scope_; // Current base scope (out_base).