Ninja
|
A tokenized string that contains variable references. More...
#include <eval_env.h>
Public Member Functions | |
void | AddSpecial (StringPiece text) |
void | AddText (StringPiece text) |
void | Clear () |
bool | empty () const |
string | Evaluate (Env *env) const |
string | Serialize () const |
Construct a human-readable representation of the parsed state, for use in tests. More... | |
Private Types | |
typedef vector< pair< string, TokenType > > | TokenList |
enum | TokenType { RAW, SPECIAL } |
Private Attributes | |
TokenList | parsed_ |
A tokenized string that contains variable references.
Can be evaluated relative to an Env.
Definition at line 59 of file eval_env.h.
|
private |
Definition at line 74 of file eval_env.h.
|
private |
Enumerator | |
---|---|
RAW | |
SPECIAL |
Definition at line 73 of file eval_env.h.
void EvalString::AddSpecial | ( | StringPiece | text | ) |
Definition at line 65 of file eval_env.cc.
References StringPiece::AsString(), parsed_, and SPECIAL.
Referenced by Lexer::ReadEvalString().
void EvalString::AddText | ( | StringPiece | text | ) |
Definition at line 57 of file eval_env.cc.
References StringPiece::AsString(), StringPiece::len_, parsed_, RAW, and StringPiece::str_.
Referenced by Lexer::ReadEvalString().
|
inline |
Definition at line 62 of file eval_env.h.
Referenced by ManifestParser::ParseDefault(), and ManifestParser::ParseEdge().
|
inline |
Definition at line 63 of file eval_env.h.
Referenced by ManifestParser::ParseDefault(), and ManifestParser::ParseEdge().
string EvalString::Evaluate | ( | Env * | env | ) | const |
Definition at line 46 of file eval_env.cc.
References Env::LookupVariable(), parsed_, and RAW.
Referenced by BindingEnv::LookupWithFallback(), ManifestParser::Parse(), ManifestParser::ParseDefault(), ManifestParser::ParseEdge(), ManifestParser::ParseFileInclude(), and ManifestParser::ParsePool().
string EvalString::Serialize | ( | ) | const |
Construct a human-readable representation of the parsed state, for use in tests.
Definition at line 69 of file eval_env.cc.
References parsed_, and SPECIAL.
Referenced by TEST().
|
private |
Definition at line 75 of file eval_env.h.
Referenced by AddSpecial(), AddText(), Evaluate(), and Serialize().