builtins: fix use
s-ol
3 months ago
81 | 81 |
for child in *tail
|
82 | 82 |
node = L\push child\eval, scope
|
83 | 83 |
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"
|
85 | 85 |
|
86 | 86 |
super RTNode!
|
87 | 87 |
|
19 | 19 |
-- @tparam any val
|
20 | 20 |
set_raw: (key, val) =>
|
21 | 21 |
result = Constant.wrap val, key
|
22 | |
@values[key] = RTNode :result
|
|
22 |
@set key, RTNode :result
|
23 | 23 |
|
24 | 24 |
--- set a symbol to a `RTNode`.
|
25 | 25 |
--
|
|
69 | 69 |
use: (other) =>
|
70 | 70 |
L\trace "using defs from #{other} in #{@}"
|
71 | 71 |
for k, v in pairs other.values
|
72 | |
@values[k] = v
|
|
72 |
@set k, v
|
73 | 73 |
|
74 | 74 |
__tostring: =>
|
75 | 75 |
buf = "<Scope"
|