aboutsummaryrefslogtreecommitdiffstats
path: root/core/init.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-02-13 09:07:05 +0000
committers-ol <s-ol@users.noreply.github.com>2020-02-13 09:07:05 +0000
commit9f80c8b41ef2e42f9bc2cce0c2172e879d308dbc (patch)
tree3b075136c22c090e9610eb51dd7e1a70bdb3c64e /core/init.moon
parentadd logic lib (diff)
downloadalive-9f80c8b41ef2e42f9bc2cce0c2172e879d308dbc.tar.gz
alive-9f80c8b41ef2e42f9bc2cce0c2172e879d308dbc.zip
no more @registry juggling
Diffstat (limited to 'core/init.moon')
-rw-r--r--core/init.moon18
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
}