aboutsummaryrefslogtreecommitdiffstats
path: root/core/base
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-04-12 17:45:02 +0000
committers-ol <s-ol@users.noreply.github.com>2020-04-12 17:45:02 +0000
commit98ed2cdbd1bce20d38fda1c830ef68807975ea93 (patch)
tree106881049995b4dc8e5979dc88b7c06ec34f0fdd /core/base
parenttime/every: allow specifying event (diff)
downloadalive-98ed2cdbd1bce20d38fda1c830ef68807975ea93.tar.gz
alive-98ed2cdbd1bce20d38fda1c830ef68807975ea93.zip
rename Action to Builtin
Diffstat (limited to 'core/base')
-rw-r--r--core/base/builtin.moon (renamed from core/base/action.moon)28
-rw-r--r--core/base/init.moon6
2 files changed, 17 insertions, 17 deletions
diff --git a/core/base/action.moon b/core/base/builtin.moon
index d10712f..fd36c69 100644
--- a/core/base/action.moon
+++ b/core/base/builtin.moon
@@ -5,12 +5,12 @@
-- up `Op`s, updating the current `Scope`, etc.
-- See `builtin` and `invoke` for examples.
--
--- @classmod Action
+-- @classmod Builtin
-class Action
---- Action interface.
+class Builtin
+--- Builtin interface.
--
--- methods that have to be implemented by `Action` implementations.
+-- methods that have to be implemented by `Builtin` implementations.
-- @section interface
--- create a new instance.
@@ -39,13 +39,13 @@ class Action
--- setup or copy state from previous instance of same type.
--
- -- `prev` is only passed if Action types of prev and current expression match.
+ -- `prev` is only passed if Builtin types of prev and current expression match.
-- Otherwise, or when no previous expression exists, `nil` is passed.
--
- -- @tparam ?Action prev the previous Action instance
+ -- @tparam ?Builtin prev the previous Builtin instance
setup: (prev) =>
- --- the `Cell` this Action was created for.
+ --- the `Cell` this Builtin was created for.
-- @tfield Cell cell
--- the evaluated head of `cell`.
@@ -57,11 +57,11 @@ class Action
--- static functions
-- @section static
- --- create and setup an `Action` for a given tag, then evaluate it.
+ --- create and setup a `Builtin` for a given tag, then evaluate it.
--
-- Create a new instance using `tag` and `head` and call `setup` on it.
-- If a previous instance with the same `tag` exists and has the same `head`,
- -- it pass it to `setup`. Register the `Action` with `tag`, evaluate it
+ -- it pass it to `setup`. Register the `Builtin` with `tag`, evaluate it
-- and return the `Result`.
--
-- @tparam Cell cell the `Cell` being evaluated
@@ -79,18 +79,18 @@ class Action
else
"initializing #{cell.tag} <#{@__name} #{head}>"
- action = @ cell, head
+ builtin = @ cell, head
if compatible
- action\setup last
+ builtin\setup last
else
last\destroy! if last
- action\setup nil
+ builtin\setup nil
- action\eval scope, cell\tail!
+ builtin\eval scope, cell\tail!
__tostring: => "<#{@@__name} #{@head}>"
__inherited: (cls) => cls.__base.__tostring = @__tostring
{
- :Action
+ :Builtin
}
diff --git a/core/base/init.moon b/core/base/init.moon
index 1b71086..9153f79 100644
--- a/core/base/init.moon
+++ b/core/base/init.moon
@@ -6,7 +6,7 @@
--
-- @module base
-- @see Op
--- @see Action
+-- @see Builtin
-- @see FnDef
-- @see Input
-- @see base.match.val
@@ -18,7 +18,7 @@
-- @see Error
import Op from require 'core.base.op'
-import Action from require 'core.base.action'
+import Builtin from require 'core.base.builtin'
import FnDef from require 'core.base.fndef'
import Input from require 'core.base.input'
import val, evt from require 'core.base.match'
@@ -28,7 +28,7 @@ import Error from require 'core.error'
{
:Op
- :Action
+ :Builtin
:FnDef
:Input
:val, :evt