aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-10-18 20:04:25 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit66e7d79d270a91f4332d8cc75de0d6bb20e11213 (patch)
treef197b3208aadd22d177376e550030db3024ac7e0
parentupdate rockspec, proper installable nix outputs (diff)
downloadalive-66e7d79d270a91f4332d8cc75de0d6bb20e11213.tar.gz
alive-66e7d79d270a91f4332d8cc75de0d6bb20e11213.zip
builtins: fix use
-rw-r--r--alv/builtins.moon2
-rw-r--r--alv/scope.moon4
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 = "<Scope"