diff --git a/a8/lisp.cc b/a8/lisp.cc index 1c06f57..88d9661 100644 --- a/a8/lisp.cc +++ b/a8/lisp.cc @@ -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) { diff --git a/a8/lisp.h b/a8/lisp.h index 95ecef4..67805d8 100644 --- a/a8/lisp.h +++ b/a8/lisp.h @@ -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