15 #ifndef NINJA_MANIFEST_PARSER_H_
16 #define NINJA_MANIFEST_PARSER_H_
32 virtual bool ReadFile(
const string& path,
string* content,
string* err) = 0;
38 bool Load(
const string& filename,
string* err);
42 return Parse(
"input", input, err);
47 bool Parse(
const string& filename,
const string& input,
string* err);
50 bool ParsePool(
string* err);
51 bool ParseRule(
string* err);
52 bool ParseLet(
string* key,
EvalString* val,
string* err);
53 bool ParseEdge(
string* err);
54 bool ParseDefault(
string* err);
57 bool ParseFileInclude(
bool new_scope,
string* err);
69 #endif // NINJA_MANIFEST_PARSER_H_
An Env which contains a mapping of variables to values as well as a pointer to a parent scope...
int ReadFile(const string &path, string *contents, string *err)
Read a file to a string (in text mode: with CRLF conversion on Windows).
Global state (file status, loaded rules) for a single run.
FileReader * file_reader_
A tokenized string that contains variable references.
bool ParseTest(const string &input, string *err)
Parse a text string of input. Used by tests.