A context for evaluating AST Expression objects. More...
#include <EvalContext.h>
 
  
 | Classes | |
| class | AlternateScoping | 
| An object that represents the use of an alternative scope stack and that will restore the original stack on destruction.  More... | |
| class | Scope | 
| An object to represent descending in a call stack.  More... | |
| class | ScopedValueName | 
| An object for declaring the name of the value whose initializer we are currently evaluating.  More... | |
| Public Member Functions | |
| EvalContext (TypeContext &ctx, std::string buildroot, std::string srcroot) | |
| std::vector < dag::DAG::BuildTarget > | Evaluate (const ast::Scope &) | 
| Scope | EnterScope (const std::string &name) | 
| AlternateScoping | ChangeScopeStack (const dag::ValueMap &alternativeScope) | 
| ScopedValueName | evaluating (const std::string &name) | 
| dag::DAGBuilder & | builder () | 
| virtual std::string | buildroot () const | 
| virtual std::string | srcroot () const | 
| virtual std::string | currentValueName () const override | 
| virtual TypeContext & | types () const override | 
| void | Define (ScopedValueName &name, dag::ValuePtr value) | 
| Define a named dag::Value in the current scope. | |
| dag::ValuePtr | Lookup (const std::string &name) | 
| Look up a named value from the current scope or a parent scope. | |
| dag::ValuePtr | Function (dag::Function::Evaluator, const SharedPtrVec< dag::Parameter > &, const FunctionType &, SourceRange=SourceRange::None()) | 
| Define a dag::Function. | |
| void | Alias (const std::shared_ptr< dag::Target > &) | 
| Create a new alias for an existing dag::Target. | |
| Protected Member Functions | |
| dag::ValueMap & | CurrentScope () | 
| dag::ValueMap | PopScope () | 
| dag::ValueMap | CopyCurrentScope () | 
| Make a deep copy of the current scope and all of its parents. | |
| void | DumpScope () | 
| void | PushValueName (const std::string &) | 
| std::string | PopValueName () | 
| std::string | fullyQualifiedName () const | 
| The fully-qualified name of the value currently being defined. | |
| std::string | qualifyName (std::string name) const | 
| Protected Attributes | |
| TypeContext & | ctx_ | 
| std::deque< std::string > | scopeName_ | 
| The components of the current scope's fully-qualified name. | |
| std::deque< dag::ValueMap > | scopes_ | 
| Symbols defined in this scope (or the one up from it, or up...). | |
| SharedPtrVec< dag::File > | files_ | 
| SharedPtrVec< dag::Build > | builds_ | 
| SharedPtrMap< dag::Rule > | rules_ | 
| SharedPtrMap< dag::Value > | variables_ | 
| SharedPtrMap< dag::Target > | targets_ | 
A context for evaluating AST Expression objects.
This class adds AST scoping logic to dag::DAGBuilder::Context.
Definition at line 69 of file EvalContext.h.