1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-11 00:52:44 +03:00
mal/cpp/MAL.h
Stephen Thirlwall 494c160856 Don't pass an env to apply
Due to some initial confusion about which env to pass to the eval
builtin, I'd been needlessly passing an env to apply all along.

No need.
2015-12-15 11:22:25 +11:00

33 lines
802 B
C++

#ifndef INCLUDE_MAL_H
#define INCLUDE_MAL_H
#include "Debug.h"
#include "RefCountedPtr.h"
#include "String.h"
#include "Validation.h"
#include <vector>
class malValue;
typedef RefCountedPtr<malValue> malValuePtr;
typedef std::vector<malValuePtr> malValueVec;
typedef malValueVec::iterator malValueIter;
class malEnv;
typedef RefCountedPtr<malEnv> malEnvPtr;
// step*.cpp
extern malValuePtr APPLY(malValuePtr op,
malValueIter argsBegin, malValueIter argsEnd);
extern malValuePtr EVAL(malValuePtr ast, malEnvPtr env);
extern malValuePtr readline(const String& prompt);
extern String rep(const String& input, malEnvPtr env);
// Core.cpp
extern void installCore(malEnvPtr env);
// Reader.cpp
extern malValuePtr readStr(const String& input);
#endif // INCLUDE_MAL_H