aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/ffi.js.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/documentation/lux/ffi.js.lux91
1 files changed, 43 insertions, 48 deletions
diff --git a/stdlib/source/documentation/lux/ffi.js.lux b/stdlib/source/documentation/lux/ffi.js.lux
index 6797208c8..71bf8062d 100644
--- a/stdlib/source/documentation/lux/ffi.js.lux
+++ b/stdlib/source/documentation/lux/ffi.js.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except int char)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
["[0]" text (.only \n)
["%" \\format (.only format)]]]
@@ -10,56 +10,11 @@
[\\library
["[0]" /]])
-(documentation: /.null
- "The null pointer.")
-
-(documentation: /.import
- "Easily import types, methods, functions and constants."
- [(import Uint8Array
- "[1]::[0]")
-
- (import TextEncoder
- "[1]::[0]"
- (new [/.String])
- (encode [/.String] Uint8Array))
-
- (import TextDecoder
- "[1]::[0]"
- (new [/.String])
- (decode [/.String] String))])
-
-(documentation: /.type_of
- "The type of an object, as text."
- [(= "boolean"
- (type_of #1))]
- [(= "number"
- (type_of +123.456))]
- [(= "string"
- (type_of "789"))]
- [(= "function"
- (type_of (function (_ value) value)))])
-
-(documentation: /.constant
- "Allows using definitions from the JavaScript host platform."
- [(constant .Frac [Math PI])])
-
-(documentation: /.closure
- (format "Allows defining closures/anonymous-functions in the form that JavaScript expects."
- \n "This is useful for adapting Lux functions for usage by JavaScript code.")
- [(is /.Function
- (closure [left right]
- (do_something (as Foo left) (as Bar right))))])
-
(.def .public documentation
(.List $.Module)
($.module /._
""
- [..null
- ..import
- ..type_of
- ..constant
- ..closure
- ($.default (/.Object brand))
+ [($.default (/.Object brand))
($.default /.Function)
($.default /.Symbol)
($.default /.Null)
@@ -70,5 +25,45 @@
($.default /.null?)
($.default /.on_browser?)
($.default /.on_nashorn?)
- ($.default /.on_node_js?)]
+ ($.default /.on_node_js?)
+
+ ($.documentation /.null
+ "The null pointer.")
+
+ ($.documentation /.import
+ "Easily import types, methods, functions and constants."
+ [(import Uint8Array
+ "[1]::[0]")
+
+ (import TextEncoder
+ "[1]::[0]"
+ (new [/.String])
+ (encode [/.String] Uint8Array))
+
+ (import TextDecoder
+ "[1]::[0]"
+ (new [/.String])
+ (decode [/.String] String))])
+
+ ($.documentation /.type_of
+ "The type of an object, as text."
+ [(= "boolean"
+ (type_of #1))]
+ [(= "number"
+ (type_of +123.456))]
+ [(= "string"
+ (type_of "789"))]
+ [(= "function"
+ (type_of (function (_ value) value)))])
+
+ ($.documentation /.constant
+ "Allows using definitions from the JavaScript host platform."
+ [(constant .Frac [Math PI])])
+
+ ($.documentation /.closure
+ (format "Allows defining closures/anonymous-functions in the form that JavaScript expects."
+ \n "This is useful for adapting Lux functions for usage by JavaScript code.")
+ [(is /.Function
+ (closure [left right]
+ (do_something (as Foo left) (as Bar right))))])]
[]))