diff options
author | Nico Weber <thakis@chromium.org> | 2015-03-24 21:16:07 (GMT) |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-03-24 22:26:48 (GMT) |
commit | 92b74c340ab6397cb728391995f86dfdb39bb186 (patch) | |
tree | 4c27f44479075415dbc6fcf656cae8ce4727f20a /src/manifest_parser.h | |
parent | 6bac2fba25df89df748c44de1d9d3b9f546d3aac (diff) | |
download | Ninja-92b74c340ab6397cb728391995f86dfdb39bb186.zip Ninja-92b74c340ab6397cb728391995f86dfdb39bb186.tar.gz Ninja-92b74c340ab6397cb728391995f86dfdb39bb186.tar.bz2 |
Add an opt-in flag to make duplicate edges an error (`-w dupbuild=err`).
This is step 1 on #931. Duplicated edges will become an error by default in
the future.
Diffstat (limited to 'src/manifest_parser.h')
-rw-r--r-- | src/manifest_parser.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/manifest_parser.h b/src/manifest_parser.h index 00a711d..f72cd6f 100644 --- a/src/manifest_parser.h +++ b/src/manifest_parser.h @@ -32,10 +32,11 @@ struct ManifestParser { virtual bool ReadFile(const string& path, string* content, string* err) = 0; }; - ManifestParser(State* state, FileReader* file_reader); + ManifestParser(State* state, FileReader* file_reader, + bool dupe_edge_should_err = false); /// Load and parse a file. - bool Load(const string& filename, string* err, Lexer* parent=NULL); + bool Load(const string& filename, string* err, Lexer* parent = NULL); /// Parse a text string of input. Used by tests. bool ParseTest(const string& input, string* err) { @@ -65,6 +66,7 @@ private: BindingEnv* env_; FileReader* file_reader_; Lexer lexer_; + bool dupe_edge_should_err_; bool quiet_; }; |