git.s-ol.nu alive / b88963e
builtins: fix use s-ol 3 months ago
2 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
8181 for child in *tail
8282 node = L\push child\eval, scope
8383 value = node\const!
84 scope\use value\unwrap 'scope', "'use' only works on scopes"
84 scope\use value\unwrap T.scope, "'use' only works on scopes"
8585
8686 super RTNode!
8787
1919 -- @tparam any val
2020 set_raw: (key, val) =>
2121 result = Constant.wrap val, key
22 @values[key] = RTNode :result
22 @set key, RTNode :result
2323
2424 --- set a symbol to a `RTNode`.
2525 --
6969 use: (other) =>
7070 L\trace "using defs from #{other} in #{@}"
7171 for k, v in pairs other.values
72 @values[k] = v
72 @set k, v
7373
7474 __tostring: =>
7575 buf = "<Scope"