diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-02-16 11:47:24 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-02-16 11:47:24 +0000 |
| commit | 2953f1e56b408fc26eb54fa65935505dd128ce82 (patch) | |
| tree | 8c7c513ccf03df06c4e9e2e70ba68031d2d0b7a5 /core/init.moon | |
| parent | add ==, mod (diff) | |
| download | alive-2953f1e56b408fc26eb54fa65935505dd128ce82.tar.gz alive-2953f1e56b408fc26eb54fa65935505dd128ce82.zip | |
major refactoring: Const, Stream + ResultNode
Diffstat (limited to 'core/init.moon')
| -rw-r--r-- | core/init.moon | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/init.moon b/core/init.moon index 1d9e191..b885747 100644 --- a/core/init.moon +++ b/core/init.moon @@ -2,7 +2,7 @@ L or= setmetatable {}, __index: => -> import Op, Action, FnDef from require 'core.base' -import Const, load_ from require 'core.const' +import Stream, Const, load_ from require 'core.value' import Scope from require 'core.scope' load_! @@ -15,7 +15,8 @@ import cell, program from require 'core.parsing' globals = Scope.from_table require 'core.builtin' { - :Const, :Cell, :RootCell + :Stream, :Const + :Cell, :RootCell :Op, :Action, :FnDef :Scope @@ -28,5 +29,6 @@ globals = Scope.from_table require 'core.builtin' scope\use inject if inject ast = assert (cell\match str), "failed to parse: #{str}" - Const.wrap ast\eval scope + result = ast\eval scope + result\value_only! } |
