This commit is contained in:
aozhiwei 2023-03-04 10:39:47 +08:00
parent b075c000c2
commit 8a1cc4a75a
2 changed files with 12 additions and 0 deletions

View File

@ -36,6 +36,13 @@ namespace a8
value = cproc;
}
void Value::Assign(List list)
{
type = ValueType::kList;
name = "";
value = list;
}
a8::XObject Value::ToXObject()
{
switch (type) {

View File

@ -26,6 +26,9 @@ namespace a8
struct Atom
{
double val = 0;
Atom() {};
Atom(double val) { this->val = val; }
};
struct Symbol
@ -45,6 +48,8 @@ namespace a8
Value(const std::string& proc_name, CProc cproc);
bool IsType(ValueType t) { return t == type; };
a8::XObject ToXObject();
void Assign(List list);
};
class Scope : public std::enable_shared_from_this<Scope>