[types] Clean up Pair and Sym types

Reconfigure the top-level object types.
- Obj is an enum pointer type
- Object is a trait that all Scheme types should implement

Define Sym, a symbol type.
Define Pair, a pair/cons/list type.

Implement Display for all types above. Implement casting methods for the above.
This commit is contained in:
Eryn Wells 2018-08-23 17:05:29 -07:00
parent f197f1ba8b
commit d825d0ec8a
4 changed files with 181 additions and 104 deletions

View file

@ -1,13 +1,10 @@
pub mod number;
pub mod char;
mod bool;
mod object;
mod predicates;
mod pair;
mod sym;
pub use object::Object;
pub use object::ObjectPtr;
pub use predicates::*;
pub use object::Obj;
pub use pair::Pair;
pub use sym::Sym;
#[cfg(test)]
mod tests {