aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-02-10 15:12:53 +0000
committers-ol <s-ol@users.noreply.github.com>2020-02-10 15:12:53 +0000
commite6ad30365e5c191ad0cb4b98f0d543414b8be7ef (patch)
tree8d67fa54725f27953d21a0833d8dd5f51680b2d8 /core
parentfinally implement function diffing (diff)
downloadalive-e6ad30365e5c191ad0cb4b98f0d543414b8be7ef.tar.gz
alive-e6ad30365e5c191ad0cb4b98f0d543414b8be7ef.zip
closures
Diffstat (limited to 'core')
-rw-r--r--core/cell.moon2
-rw-r--r--core/invoke.moon6
2 files changed, 4 insertions, 4 deletions
diff --git a/core/cell.moon b/core/cell.moon
index 1a25c0a..ae6eea4 100644
--- a/core/cell.moon
+++ b/core/cell.moon
@@ -36,7 +36,7 @@ class Cell
@tag = cell.tag -- for writing back to file
clone: (prefix) =>
- tag = Const.sym prefix\getc! .. @tag\getc!
+ tag = Const.sym prefix\getc! .. '.' .. @tag\getc!
children = [child\clone prefix for child in *@children]
Cell tag, children, @white
diff --git a/core/invoke.moon b/core/invoke.moon
index 6458f2b..9955bce 100644
--- a/core/invoke.moon
+++ b/core/invoke.moon
@@ -45,9 +45,9 @@ class fn_invoke extends Action
true
- eval: (scope, tail) =>
+ eval: (outer_scope, tail) =>
assert @head.type == 'fndef', "cant fn-invoke #{@head}"
- { :params, :body } = @head\getc!
+ { :params, :body, :scope } = @head\getc!
assert #params == #tail, "argument count mismatch in #{@head}"
@@ -56,7 +56,7 @@ class fn_invoke extends Action
for i=1,#params
name = params[i]\getc!
argm = tail[i]
- fn_scope\set name, L\push argm\eval, scope, @registry
+ fn_scope\set name, L\push argm\eval, outer_scope, @registry
body = body\clone @tag