diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-07-08 15:28:09 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-07-08 15:29:05 +0000 |
| commit | 9fba1749117d9ace2863fc527277c8d7e26d4cf9 (patch) | |
| tree | 639b3bef6b9b0ef995021763b7d3c220a3968160 /alv/base | |
| parent | copilot: pass args through base constructor (diff) | |
| download | alive-9fba1749117d9ace2863fc527277c8d7e26d4cf9.tar.gz alive-9fba1749117d9ace2863fc527277c8d7e26d4cf9.zip | |
store RTNode in Builtin
Diffstat (limited to 'alv/base')
| -rw-r--r-- | alv/base/builtin.moon | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/alv/base/builtin.moon b/alv/base/builtin.moon index 5f46f37..54f7433 100644 --- a/alv/base/builtin.moon +++ b/alv/base/builtin.moon @@ -29,10 +29,18 @@ class Builtin -- - perform scope effects -- - wrap all child-results -- + -- @function eval -- @tparam Scope scope the active scope -- @tparam {AST,...} tail the arguments to this expression -- @treturn RTNode the result of this evaluation - eval: (scope, tail) => error "not implemented" + + --- store the evaluation result for access by editor and return it. + -- + -- This should always be called via `super` as the last statement in all + -- overriden `eval` methods. + -- + -- @tparam RTNode node the evaluation result + eval: (@node) => @node --- free resources destroy: => @@ -54,6 +62,9 @@ class Builtin --- the identity of `cell`. -- @tfield Tag tag + --- the last result of `eval`. + -- @tfield RTNode node + --- static functions -- @section static |
