Ninja
Public Member Functions | Private Types | Private Attributes | List of all members
EvalString Struct Reference

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_
 

Detailed Description

A tokenized string that contains variable references.

Can be evaluated relative to an Env.

Definition at line 59 of file eval_env.h.

Member Typedef Documentation

typedef vector<pair<string, TokenType> > EvalString::TokenList
private

Definition at line 74 of file eval_env.h.

Member Enumeration Documentation

enum EvalString::TokenType
private
Enumerator
RAW 
SPECIAL 

Definition at line 73 of file eval_env.h.

Member Function Documentation

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().

void EvalString::Clear ( )
inline

Definition at line 62 of file eval_env.h.

Referenced by ManifestParser::ParseDefault(), and ManifestParser::ParseEdge().

bool EvalString::empty ( ) const
inline

Definition at line 63 of file eval_env.h.

Referenced by ManifestParser::ParseDefault(), and ManifestParser::ParseEdge().

string EvalString::Evaluate ( Env env) const
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().

Member Data Documentation

TokenList EvalString::parsed_
private

Definition at line 75 of file eval_env.h.

Referenced by AddSpecial(), AddText(), Evaluate(), and Serialize().


The documentation for this struct was generated from the following files: