aboutsummaryrefslogtreecommitdiffstats
path: root/core/scope.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-03-08 12:37:56 +0000
committers-ol <s-ol@users.noreply.github.com>2020-03-08 12:37:56 +0000
commitc1bf53627c894e4068aca5576d054803bc574a86 (patch)
treeb136f1d54bbdcbf2aa914a90d87252addf631f56 /core/scope.moon
parentadd ldoc documentation (diff)
downloadalive-c1bf53627c894e4068aca5576d054803bc574a86.tar.gz
alive-c1bf53627c894e4068aca5576d054803bc574a86.zip
more changes for ldoc
Diffstat (limited to 'core/scope.moon')
-rw-r--r--core/scope.moon36
1 files changed, 18 insertions, 18 deletions
diff --git a/core/scope.moon b/core/scope.moon
index c61a446..a7373c4 100644
--- a/core/scope.moon
+++ b/core/scope.moon
@@ -6,8 +6,8 @@ import Value from require 'core.value'
import Result from require 'core.result'
class Scope
---- methods
--- @section methods
+--- members
+-- @section members
--- create an instance.
--
@@ -19,7 +19,7 @@ class Scope
--- set a Lua value in the scope.
--
- -- wraps `val` in a `Value` and `Result` before calling `\set`.
+ -- wraps `val` in a `Value` and `Result` before calling `set`.
--
-- @tparam string key
-- @tparam any val
@@ -72,21 +72,6 @@ class Scope
for k, v in pairs other.values
@values[k] = v
---- static functions
--- @section static
-
- --- converts a Lua table to a Scope.
- --
- -- `tbl` may contain more tables (or `Scope`s).
- -- Uses `Value``.wrap` on the values recursively.
- --
- -- @tparam table tbl the table to convert
- -- @treturn Scope
- from_table: (tbl) ->
- with Scope!
- for k, v in pairs tbl
- \set_raw k, v
-
__tostring: =>
buf = "<Scope"
@@ -106,6 +91,21 @@ class Scope
buf ..= ">"
buf
+--- static functions
+-- @section static
+
+ --- converts a Lua table to a Scope.
+ --
+ -- `tbl` may contain more tables (or `Scope`s).
+ -- Uses `Value.wrap` on the values recursively.
+ --
+ -- @tparam table tbl the table to convert
+ -- @treturn Scope
+ @from_table: (tbl) ->
+ with Scope!
+ for k, v in pairs tbl
+ \set_raw k, v
+
{
:Scope
}