diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-02-11 17:35:26 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-02-13 08:39:03 +0000 |
| commit | 85df7feacac36f5cd058e86ff81b3f4aa9f0ded8 (patch) | |
| tree | adf72d8d77016eb8e9d211f256dbdc52d5f14350 /core/invoke.moon | |
| parent | add edge and pilot/* (diff) | |
| download | alive-85df7feacac36f5cd058e86ff81b3f4aa9f0ded8.tar.gz alive-85df7feacac36f5cd058e86ff81b3f4aa9f0ded8.zip | |
new Registry tagging mechanism
Diffstat (limited to 'core/invoke.moon')
| -rw-r--r-- | core/invoke.moon | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/core/invoke.moon b/core/invoke.moon index 9955bce..9c324e1 100644 --- a/core/invoke.moon +++ b/core/invoke.moon @@ -7,7 +7,7 @@ class UpdateChildren update: (dt) => for child in *@children - L\trace "updating #{child}" + -- L\trace "updating #{child}" L\push child\update, dt get: => @children[#@children]\get! @@ -28,7 +28,9 @@ class op_invoke extends Action true eval: (scope, tail) => - args = [expr\eval scope, @registry for expr in *tail] + L\trace "evaling #{@}" + args = L\push -> [L\push expr\eval, scope, @registry for expr in *tail] + -- Const 'op', with @op with @op \setup unpack args @@ -63,19 +65,10 @@ class fn_invoke extends Action body\eval fn_scope, @registry class do_expr extends Action - class DoWrapper - new: (@children) => - - update: (dt) => - for child in *@children - L\push child\update, dt - - get: => @children[#@children]\get! - getc: => @children[#@children]\getc! - - __tostring: => '<dowrapper>' - eval: (scope, tail) => UpdateChildren [(expr\eval scope, @registry) or Const.empty! for expr in *tail] -:op_invoke, :fn_invoke +{ + :op_invoke, :fn_invoke + :UpdateChildren +} |
