mirror of
https://github.com/kanaka/mal.git
synced 2024-11-11 00:52:44 +03:00
30 lines
633 B
C++
30 lines
633 B
C++
#ifndef INCLUDE_ENVIRONMENT_H
|
|
#define INCLUDE_ENVIRONMENT_H
|
|
|
|
#include "MAL.h"
|
|
|
|
#include <map>
|
|
|
|
class malEnv : public RefCounted {
|
|
public:
|
|
malEnv(malEnvPtr outer = NULL);
|
|
malEnv(malEnvPtr outer,
|
|
const StringVec& bindings,
|
|
malValueIter argsBegin,
|
|
malValueIter argsEnd);
|
|
|
|
~malEnv();
|
|
|
|
malValuePtr get(const String& symbol);
|
|
malEnvPtr find(const String& symbol);
|
|
malValuePtr set(const String& symbol, malValuePtr value);
|
|
malEnvPtr getRoot();
|
|
|
|
private:
|
|
typedef std::map<String, malValuePtr> Map;
|
|
Map m_map;
|
|
malEnvPtr m_outer;
|
|
};
|
|
|
|
#endif // INCLUDE_ENVIRONMENT_H
|