summaryrefslogtreecommitdiff
path: root/src/manifest_parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/manifest_parser.h')
-rw-r--r--src/manifest_parser.h20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/manifest_parser.h b/src/manifest_parser.h
index 76c17b0..e14d069 100644
--- a/src/manifest_parser.h
+++ b/src/manifest_parser.h
@@ -15,16 +15,10 @@
#ifndef NINJA_MANIFEST_PARSER_H_
#define NINJA_MANIFEST_PARSER_H_
-#include <string>
-
-using namespace std;
-
-#include "lexer.h"
+#include "parser.h"
struct BindingEnv;
struct EvalString;
-struct FileReader;
-struct State;
enum DupeEdgeAction {
kDupeEdgeActionWarn,
@@ -45,13 +39,10 @@ struct ManifestParserOptions {
};
/// Parses .ninja files.
-struct ManifestParser {
+struct ManifestParser : public Parser {
ManifestParser(State* state, FileReader* file_reader,
ManifestParserOptions options = ManifestParserOptions());
- /// Load and parse a file.
- 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) {
quiet_ = true;
@@ -72,14 +63,7 @@ private:
/// Parse either a 'subninja' or 'include' line.
bool ParseFileInclude(bool new_scope, string* err);
- /// If the next token is not \a expected, produce an error string
- /// saying "expected foo, got bar".
- bool ExpectToken(Lexer::Token expected, string* err);
-
- State* state_;
BindingEnv* env_;
- FileReader* file_reader_;
- Lexer lexer_;
ManifestParserOptions options_;
bool quiet_;
};