A scope is a container for name->value mappings. More...
#include <Scope.h>
Public Types | |
typedef StringMap< const Type & > | SymbolMap |
Public Member Functions | |
Scope (const Scope *parent, const std::string &name, const Type &argumentsType, TypeContext &) | |
Scope (Scope &&) | |
const SymbolMap & | symbols () const |
const std::string & | name () const |
bool | hasArguments () const |
const Type & | arguments () const |
const UniqPtrVec< Value > & | values () const |
bool | contains (const Identifier &) const |
virtual const Type & | Lookup (const Identifier &) const |
void | Register (const Argument *) |
void | Register (const Parameter *) |
void | Register (const Value &) |
void | Take (Value *) |
void | Take (UniqPtr< Value > &) |
UniqPtrVec< Value > | TakeValues () |
virtual void | PrettyPrint (Bytestream &, size_t indent) const override |
Print a human-readable representation to an output stream and return that output stream. | |
virtual void | Accept (Visitor &) const |
Public Member Functions inherited from fabrique::Printable | |
Printable (const Printable &) | |
Printable & | operator= (const Printable &) |
virtual std::string | str () const |
A scope is a container for name->value mappings.
A scope can have a parent scope for recursive name lookups.