diff options
Diffstat (limited to 'core/init.moon')
| -rw-r--r-- | core/init.moon | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/core/init.moon b/core/init.moon index c8f0265..f9a3b9e 100644 --- a/core/init.moon +++ b/core/init.moon @@ -22,24 +22,10 @@ globals = Scope.from_table require 'core.builtin' :globals parse: program\match - eval: do - class BuiltinRegistry - new: => - @cnt = 1 - - init: (tag, expr) => - tag\set @cnt - @cnt += 1 - - last: (index) => - replace: (index, expr) => - - registry = BuiltinRegistry! - - (str, inject) -> + eval: (str, inject) -> scope = Scope nil, globals scope\use inject if inject ast = assert (cell\match str), "failed to parse: #{str}" - Const.wrap ast\eval scope, registry + Const.wrap ast\eval scope } |
