std lib load code reformat
This commit is contained in:
parent
01a16802da
commit
e0ec884394
21
ml.cpp
21
ml.cpp
|
|
@ -1633,16 +1633,17 @@ void repl(MlEnvironment &env) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_std_lib(MlEnvironment &env) {
|
void load_std_lib(MlEnvironment &env) {
|
||||||
std::string loader = R"( (define ___lib_path '("/usr/local/var/mlisp"))
|
std::string loader =
|
||||||
(for d ___lib_path
|
R"( (define ___lib_path '("/usr/local/var/mlisp"))
|
||||||
(if (is-dir? d)
|
(for d ___lib_path
|
||||||
(for f (ls-dir d)
|
(if (is-dir? d)
|
||||||
(if (regex-search? f "^.*\.l(i)?sp$")
|
(for f (ls-dir d)
|
||||||
(include (+ d "/" f))
|
(if (regex-search? f "^.*\.l(i)?sp$")
|
||||||
'())
|
(include (+ d "/" f))
|
||||||
)
|
'())
|
||||||
'()))
|
)
|
||||||
)";
|
'()))
|
||||||
|
)";
|
||||||
|
|
||||||
run(loader, env);
|
run(loader, env);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue