|
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 |
| std::string | Evaluate (Env *env) const |
| std::string | Serialize () const |
| Construct a human-readable representation of the parsed state, for use in tests. More... | |
| std::string | Unparse () const |
Private Types | |
| typedef std::vector< std::pair< std::string, TokenType > > | TokenList |
| enum | TokenType { RAW , SPECIAL } |
Private Attributes | |
| TokenList | parsed_ |
| std::string | single_token_ |
A tokenized string that contains variable references.
Can be evaluated relative to an Env.
Definition at line 35 of file eval_env.h.
|
private |
Definition at line 55 of file eval_env.h.
|
private |
| Enumerator | |
|---|---|
| RAW | |
| SPECIAL | |
Definition at line 54 of file eval_env.h.
| void EvalString::AddSpecial | ( | StringPiece | text | ) |
Definition at line 136 of file eval_env.cc.
References StringPiece::AsString().
Referenced by Lexer::ReadEvalString().
| void EvalString::AddText | ( | StringPiece | text | ) |
Definition at line 126 of file eval_env.cc.
References StringPiece::AsString(), StringPiece::begin(), and StringPiece::end().
Referenced by MissingDependencyScannerTest::CreateInitialState(), and Lexer::ReadEvalString().
|
inline |
Definition at line 43 of file eval_env.h.
References parsed_, and single_token_.
Referenced by ManifestParser::ParseDefault(), and ManifestParser::ParseEdge().
|
inline |
Definition at line 44 of file eval_env.h.
References parsed_, and single_token_.
Referenced by ManifestParser::ParseDefault(), DyndepParser::ParseEdge(), and ManifestParser::ParseEdge().
| string EvalString::Evaluate | ( | Env * | env | ) | const |
Definition at line 111 of file eval_env.cc.
References Env::LookupVariable().
Referenced by BindingEnv::LookupWithFallback(), ManifestParser::Parse(), ManifestParser::ParseDefault(), DyndepParser::ParseDyndepVersion(), DyndepParser::ParseEdge(), 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 146 of file eval_env.cc.
Referenced by TEST().
| string EvalString::Unparse | ( | ) | const |
Definition at line 164 of file eval_env.cc.
|
private |
Definition at line 56 of file eval_env.h.
|
private |
Definition at line 62 of file eval_env.h.