load stdlib code bit simplyfied
This commit is contained in:
18
ml.h
18
ml.h
@@ -10,16 +10,14 @@
|
||||
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))
|
||||
'())
|
||||
)
|
||||
'()))
|
||||
)";
|
||||
R"(
|
||||
(do (define ___lib_path "/usr/local/var/mlisp")
|
||||
(if (is-dir? ___lib_path)
|
||||
(for file (ls-dir ___lib_path)
|
||||
(if (string-regex? file "^.*\.l(i)?sp$")
|
||||
(include (+ ___lib_path "/" file)))
|
||||
)))
|
||||
)";
|
||||
|
||||
|
||||
// Forward declaration for MlEnvironment class definition
|
||||
|
||||
Reference in New Issue
Block a user