18 map<string, string>::iterator i =
bindings_.find(var);
33 map<string, string>::iterator i =
bindings_.find(var);
48 for (TokenList::const_iterator i =
parsed_.begin(); i !=
parsed_.end(); ++i) {
50 result.append(i->first);
71 for (TokenList::const_iterator i =
parsed_.begin();
76 result.append(i->first);
map< string, string > bindings_
StringPiece represents a slice of a string whose memory is managed externally.
string AsString() const
Convert the slice into a full-fledged std::string, copying the data into a new string.
void AddSpecial(StringPiece text)
string Serialize() const
Construct a human-readable representation of the parsed state, for use in tests.
virtual string LookupVariable(const string &var)=0
virtual string LookupVariable(const string &var)
string LookupWithFallback(const string &var, const EvalString *eval, Env *env)
This is tricky.
void AddBinding(const string &key, const string &val)
void AddText(StringPiece text)
string Evaluate(Env *env) const
A tokenized string that contains variable references.
An interface for a scope for variable (e.g. "$foo") lookups.