fixes & enhandcements
(benchmark code..) implemented repl completion very first version (string xx) added some builtin renames a bit of comments a bit of cocumentation (sleep interval) added
This commit is contained in:
18
ml.h
18
ml.h
@@ -9,6 +9,18 @@
|
||||
|
||||
const std::string VERSION = "mi 0.1 (" __DATE__ " " __TIME__ ")";
|
||||
|
||||
const std::string STDLIB_LOADER =
|
||||
R"( (define ___lib_path '("/usr/local/var/mlisp"))
|
||||
(for d ___lib_path
|
||||
(if (is-dir? d)
|
||||
(for f (ls-dir d)
|
||||
(if (string-regex? f "^.*\.l(i)?sp$")
|
||||
(include (+ d "/" f))
|
||||
'())
|
||||
)
|
||||
'()))
|
||||
)";
|
||||
|
||||
|
||||
// Forward declaration for MlEnvironment class definition
|
||||
class MlValue;
|
||||
@@ -32,6 +44,9 @@ public:
|
||||
// Set the value associated with this name in this scope
|
||||
void set(const std::string &name, MlValue value);
|
||||
|
||||
// Get vector of executables in this scope
|
||||
std::vector<std::string> get_lambdas_list() const;
|
||||
|
||||
void combine(MlEnvironment const &other);
|
||||
|
||||
void set_parent_scope(MlEnvironment *parent) {
|
||||
@@ -153,6 +168,9 @@ public:
|
||||
// Cast this to a floating point value
|
||||
MlValue cast_to_float() const;
|
||||
|
||||
// Cast this to a string
|
||||
MlValue cast_to_string() const;
|
||||
|
||||
|
||||
bool operator==(MlValue other) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user