Class: Campa::Lisp::Core
Direct Known Subclasses
Constant Summary collapse
- CORE_FUNCS_MAP =
{ "quote" => Quote, "atom" => Atom, "eq" => Eq, "car" => Car, "cdr" => Cdr, "cons" => Cons, "cond" => Cond, "lambda" => LambdaFn, "label" => Label, "defun" => Defun, "_cadr" => Cadr, "list" => ListFn, "load" => Campa::Core::Load, }.freeze
Instance Attribute Summary
Attributes inherited from Context
Instance Method Summary collapse
-
#initialize ⇒ Core
constructor
A new instance of Core.
Methods inherited from Context
#[], #[]=, #bindings, #include?, #push
Constructor Details
#initialize ⇒ Core
Returns a new instance of Core.
22 23 24 25 26 |
# File 'lib/campa/lisp/core.rb', line 22 def initialize super Hash[ CORE_FUNCS_MAP.map { |label, handler| [sym(label), handler.new] } ] end |