diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-08 17:23:31 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-08 17:43:11 +0000 |
| commit | 75c662e7b01e4f85fbe3e500158239bc244f8112 (patch) | |
| tree | b3e236bbbf852ef61573d29086bb773402842830 /core/base | |
| parent | more changes for ldoc (diff) | |
| download | alive-75c662e7b01e4f85fbe3e500158239bc244f8112.tar.gz alive-75c662e7b01e4f85fbe3e500158239bc244f8112.zip | |
add internals docs
Diffstat (limited to 'core/base')
| -rw-r--r-- | core/base/fndef.moon | 4 | ||||
| -rw-r--r-- | core/base/input.moon | 8 | ||||
| -rw-r--r-- | core/base/io.moon | 1 | ||||
| -rw-r--r-- | core/base/op.moon | 2 |
4 files changed, 10 insertions, 5 deletions
diff --git a/core/base/fndef.moon b/core/base/fndef.moon index 5e65eba..dee914f 100644 --- a/core/base/fndef.moon +++ b/core/base/fndef.moon @@ -7,8 +7,12 @@ -- @classmod FnDef class FnDef +--- static functions +-- @section static + --- create a new instance -- + -- @classmethod -- @tparam {Value,...} params (`AST:quote`d) naming the function parameters -- @tparam AST body (`AST:quote`d) expression the function evaluates to -- @tparam Scope scope the lexical scope the function was defined in (closure) diff --git a/core/base/input.moon b/core/base/input.moon index 772b34e..dae5b43 100644 --- a/core/base/input.moon +++ b/core/base/input.moon @@ -13,12 +13,12 @@ class Input -- Methods that have to be implemented by `Input` implementations. -- @section interface - --- create an instance (optional). + --- create a new Input. -- -- `value` is either a `Value` or a `Result` instance and should be -- unwrapped and assigned to `stream`. -- - -- @function new + -- @classmethod -- @tparam Value|Result value new: (value) => assert value, "nil passed to Input: #{value}" @@ -37,9 +37,7 @@ class Input -- -- May enter a 'setup state' that is exited using `finish_setup`. -- - -- @function setup -- @tparam ?Input prev previous `Input` intance or nil - -- @see Op\setup setup: (prev) => --- whether this input requires processing (optional). @@ -111,7 +109,7 @@ class Input --- Create an `IO` `Input`. -- -- Marked dirty only when an `IO` is dirty. Must be used only for `Value`s - -- which @{Value:unwrap|unwrap}` to `IO` instances. + -- which @{Value:unwrap|unwrap} to `IO` instances. -- -- @tparam Value|Result value @io: (value) -> IOInput value diff --git a/core/base/io.moon b/core/base/io.moon index a60410f..7d031d0 100644 --- a/core/base/io.moon +++ b/core/base/io.moon @@ -13,6 +13,7 @@ class IO --- construct a new instance. -- -- Must prepare the instance for `dirty` to be called. + -- @classmethod new: => --- poll for changes. diff --git a/core/base/op.moon b/core/base/op.moon index 8475ded..f1aa9cc 100644 --- a/core/base/op.moon +++ b/core/base/op.moon @@ -15,6 +15,7 @@ class Op -- The super-constructor can be used to construct a `Value` instance in `out`. -- -- @function new + -- @classmethod --- parse arguments and patch self. -- @@ -84,6 +85,7 @@ class Op -- it is okay not to use this and create the output stream in :setup() if the -- type is not known at this time. -- + -- @classmethod -- @tparam[opt] string type the type-name for `out` -- @tparam[optchain] any init the initial value for `out` new: (type, init) => |
