From 66e7d79d270a91f4332d8cc75de0d6bb20e11213 Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 18 Oct 2022 22:04:25 +0200 Subject: builtins: fix use --- alv/builtins.moon | 2 +- alv/scope.moon | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/alv/builtins.moon b/alv/builtins.moon index 9203064..50380d5 100644 --- a/alv/builtins.moon +++ b/alv/builtins.moon @@ -82,7 +82,7 @@ All arguments have to be evaltime constant." for child in *tail node = L\push child\eval, scope value = node\const! - scope\use value\unwrap 'scope', "'use' only works on scopes" + scope\use value\unwrap T.scope, "'use' only works on scopes" super RTNode! diff --git a/alv/scope.moon b/alv/scope.moon index 96dbfa2..3b35db1 100644 --- a/alv/scope.moon +++ b/alv/scope.moon @@ -20,7 +20,7 @@ class Scope -- @tparam any val set_raw: (key, val) => result = Constant.wrap val, key - @values[key] = RTNode :result + @set key, RTNode :result --- set a symbol to a `RTNode`. -- @@ -70,7 +70,7 @@ class Scope use: (other) => L\trace "using defs from #{other} in #{@}" for k, v in pairs other.values - @values[k] = v + @set k, v __tostring: => buf = "