diff options
Diffstat (limited to 'src/eval_env.h')
-rw-r--r-- | src/eval_env.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/eval_env.h b/src/eval_env.h index f0108ae..b1b63ca 100644 --- a/src/eval_env.h +++ b/src/eval_env.h @@ -20,13 +20,13 @@ #include <vector> using namespace std; -// A scope for variable lookups. +/// An interface for a scope for variable (e.g. "$foo") lookups. struct Env { virtual string LookupVariable(const string& var) = 0; }; -// A standard scope, which contains a mapping of variables to values -// as well as a pointer to a parent scope. +/// An Env which contains a mapping of variables to values +/// as well as a pointer to a parent scope. struct BindingEnv : public Env { BindingEnv() : parent_(NULL) {} virtual string LookupVariable(const string& var); @@ -36,8 +36,8 @@ struct BindingEnv : public Env { Env* parent_; }; -// A tokenized string that contains variable references. -// Can be evaluated relative to an Env. +/// A tokenized string that contains variable references. +/// Can be evaluated relative to an Env. struct EvalString { bool Parse(const string& input, string* err, size_t* err_index=NULL); string Evaluate(Env* env) const; |