MlValue::is_string added

This commit is contained in:
2021-05-15 23:43:24 +02:00
parent fb25a7ea40
commit 08131d3e4e
2 changed files with 9 additions and 4 deletions

7
ml.h
View File

@@ -136,17 +136,18 @@ public:
std::vector<std::string> get_used_atoms();
// Is this a builtin function?
bool is_builtin();
// Apply this as a function to a list of arguments in a given environment.
MlValue apply(std::vector<MlValue> args, MlEnvironment &env);
// Evaluate this value as lisp code.
MlValue eval(MlEnvironment &env);
bool is_builtin() const;
bool is_number() const;
bool is_string() const;
// Get the boolean value of this value.
bool as_bool() const;