move list of builtins to ml_util.cpp

this is not final solution, just for now
This commit is contained in:
2021-03-15 23:24:58 +01:00
parent 6700c04159
commit 35cf6b13e5
2 changed files with 11 additions and 9 deletions

9
ml.cpp
View File

@@ -1830,16 +1830,7 @@ std::vector<std::string> MlEnvironment::get_lambdas_list() const {
lambdas.push_back(it->first);
}
}
std::vector<std::string> commands {
"eval", "type", "parse", "do", "if", "for", "while", "scope", "quote", "defun",
"define", "lambda", "benchmark", "=", "!=", ">", "<", ">=", "<=", "+", "-", "*", "/", "%",
"list", "insert", "index", "remove", "len", "push", "pop", "head", "tail", "first", "last",
"range", "map", "filter", "reduce", "exit", "quit", "print", "input", "random", "include",
"read-file", "write-file", "read-url", "system-cmd", "ls-dir", "is-file?", "is-dir?",
"parse-csv", "parse-json", "get-universal-time", "date-to-str", "str-to-date", "date-add", "debug",
"sprintf", "display", "string-replace", "string-regex?", "string-pad", "int", "float", "string" };
lambdas.insert(end(lambdas), begin(commands), end(commands));
return lambdas;
}