diff options
author | Eduardo Julian | 2022-06-05 01:39:29 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-05 01:39:29 -0400 |
commit | f623de52d76ad8ec96feb048cd95a3fb150717e1 (patch) | |
tree | 92a53eb8e5a25287e59eb104716abe5cc2ebd60a /stdlib/source/documentation | |
parent | 75e8244fd7914d2ac0c3622d2277b84c4bfa7ffb (diff) |
De-sigil-ification: : [Part 1]
Diffstat (limited to 'stdlib/source/documentation')
-rw-r--r-- | stdlib/source/documentation/lux.lux | 23 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/ffi.js.lux | 10 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/ffi.jvm.lux | 16 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/ffi.lua.lux | 6 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/ffi.old.lux | 16 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/ffi.py.lux | 8 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/ffi.rb.lux | 8 | ||||
-rw-r--r-- | stdlib/source/documentation/lux/macro/syntax.lux | 2 |
8 files changed, 45 insertions, 44 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 2f5090611..59a5159b4 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -428,17 +428,18 @@ (-> [Code Code] (List Code)) (list left right))]) -(documentation: /.macro: +(documentation: /.macro "Macro-definition macro." - [(macro: .public (symbol tokens) - (case tokens - (^template [<tag>] - [(pattern (list [_ {<tag> [module name]}])) - (in (list (` [(~ (text$ module)) (~ (text$ name))])))]) - ([#Symbol]) - - _ - (failure "Wrong syntax for symbol")))]) + [(def: .public symbol + (macro (_ tokens) + (case tokens + (^template [<tag>] + [(pattern (list [_ {<tag> [module name]}])) + (in (list (` [(~ (text$ module)) (~ (text$ name))])))]) + ([#Symbol]) + + _ + (failure "Wrong syntax for symbol"))))]) (documentation: /.and "Short-circuiting 'and'." @@ -958,7 +959,7 @@ ..let ..function ..def: - ..macro: + ..macro ..and ..or ..panic! diff --git a/stdlib/source/documentation/lux/ffi.js.lux b/stdlib/source/documentation/lux/ffi.js.lux index 25f7420f1..2988533be 100644 --- a/stdlib/source/documentation/lux/ffi.js.lux +++ b/stdlib/source/documentation/lux/ffi.js.lux @@ -13,17 +13,17 @@ (documentation: /.null "The null pointer.") -(documentation: /.import: +(documentation: /.import "Easily import types, methods, functions and constants." - [(import: Uint8Array + [(import Uint8Array "[1]::[0]") - (import: TextEncoder + (import TextEncoder "[1]::[0]" (new [/.String]) (encode [/.String] Uint8Array)) - (import: TextDecoder + (import TextDecoder "[1]::[0]" (new [/.String]) (decode [/.String] String))]) @@ -55,7 +55,7 @@ ($.module /._ "" [..null - ..import: + ..import ..type_of ..constant ..closure diff --git a/stdlib/source/documentation/lux/ffi.jvm.lux b/stdlib/source/documentation/lux/ffi.jvm.lux index 2dc3d9a61..22bd01753 100644 --- a/stdlib/source/documentation/lux/ffi.jvm.lux +++ b/stdlib/source/documentation/lux/ffi.jvm.lux @@ -175,10 +175,10 @@ (ClassName::method1 arg0 arg1 arg2) (ClassName::method2 arg3 arg4 arg5))]) -(documentation: /.import: +(documentation: /.import "Allows importing JVM classes, and using them as types." ["Their methods, fields and enum options can also be imported." - (import: java/lang/Object + (import java/lang/Object "[1]::[0]" (new []) (equals [java/lang/Object] boolean) @@ -188,29 +188,29 @@ "'try' means that the computation might throw an exception, and the return value will be wrapped by the Try type." "'io' means the computation has side effects, and will be wrapped by the IO type." "These options must show up in the following order ['io' 'try' '?'] (although, each option can be used independently)." - (import: java/lang/String + (import java/lang/String "[1]::[0]" (new [[byte]]) ("static" valueOf [char] java/lang/String) ("static" valueOf "as" int_valueOf [int] java/lang/String)) - (import: (java/util/List e) + (import (java/util/List e) "[1]::[0]" (size [] int) (get [int] e)) - (import: (java/util/ArrayList a) + (import (java/util/ArrayList a) "[1]::[0]" ([T] toArray [[T]] [T]))] ["The class-type that is generated is of the fully-qualified name." "This avoids a clash between the java.util.List type, and Lux's own List type." "All enum options to be imported must be specified." - (import: java/lang/Character$UnicodeScript + (import java/lang/Character$UnicodeScript "[1]::[0]" ("enum" ARABIC CYRILLIC LATIN))] ["It should also be noted, the only types that may show up in method arguments or return values may be Java classes, arrays, primitives, void or type-vars." "Lux types, such as Maybe cannot be named (otherwise, they'd be confused for Java classes)." - (import: (lux/concurrency/async/JvmAsync A) + (import (lux/concurrency/async/JvmAsync A) "[1]::[0]" (resolve [A] boolean) (poll [] A) @@ -315,7 +315,7 @@ ..as ..synchronized ..do_to - ..import: + ..import ..array ..length ..read! diff --git a/stdlib/source/documentation/lux/ffi.lua.lux b/stdlib/source/documentation/lux/ffi.lua.lux index 2633e3fe9..6fc62139c 100644 --- a/stdlib/source/documentation/lux/ffi.lua.lux +++ b/stdlib/source/documentation/lux/ffi.lua.lux @@ -10,9 +10,9 @@ [\\library ["[0]" /]]) -(documentation: /.import: +(documentation: /.import "Easily import types, methods, functions and constants." - [(import: (os/getenv [..String] "io" "?" ..String))]) + [(import (os/getenv [..String] "io" "?" ..String))]) (documentation: /.closure (format "Allows defining closures/anonymous-functions in the form that Lua expects." @@ -25,7 +25,7 @@ (.List $.Module) ($.module /._ "" - [..import: + [..import ..closure ($.default (/.Object brand)) ($.default /.Nil) diff --git a/stdlib/source/documentation/lux/ffi.old.lux b/stdlib/source/documentation/lux/ffi.old.lux index c7bfb5ceb..863749adf 100644 --- a/stdlib/source/documentation/lux/ffi.old.lux +++ b/stdlib/source/documentation/lux/ffi.old.lux @@ -138,10 +138,10 @@ (ClassName::method0 arg0 arg1 arg2) (ClassName::method1 arg3 arg4 arg5))]) -(documentation: /.import: +(documentation: /.import (format "Allows importing JVM classes, and using them as types." \n "Their methods, fields and enum options can also be imported.") - [(import: java/lang/Object + [(import java/lang/Object "[1]::[0]" (new []) (equals [java/lang/Object] boolean) @@ -151,29 +151,29 @@ "'try' means that the computation might throw an exception, and the return value will be wrapped by the Try type." "'io' means the computation has side effects, and will be wrapped by the IO type." "These options must show up in the following order ['io' 'try' '?'] (although, each option can be used independently)." - (import: java/lang/String + (import java/lang/String "[1]::[0]" (new [[byte]]) ("static" valueOf [char] java/lang/String) ("static" valueOf "as" int_valueOf [int] java/lang/String)) - (import: (java/util/List e) + (import (java/util/List e) "[1]::[0]" (size [] int) (get [int] e)) - (import: (java/util/ArrayList a) + (import (java/util/ArrayList a) "[1]::[0]" ([T] toArray [[T]] [T]))] ["The class-type that is generated is of the fully-qualified name." "This avoids a clash between the java.util.List type, and Lux's own List type." "All enum options to be imported must be specified." - (import: java/lang/Character$UnicodeScript + (import java/lang/Character$UnicodeScript "[1]::[0]" ("enum" ARABIC CYRILLIC LATIN))] ["It should also be noted, the only types that may show up in method arguments or return values may be Java classes, arrays, primitives, void or type-parameters." "Lux types, such as Maybe cannot be named (otherwise, they'd be confused for Java classes)." - (import: (lux/concurrency/async/JvmAsync A) + (import (lux/concurrency/async/JvmAsync A) "[1]::[0]" (resolve [A] boolean) (poll [] A) @@ -249,7 +249,7 @@ ..check ..synchronized ..do_to - ..import: + ..import ..array ..length ..read! diff --git a/stdlib/source/documentation/lux/ffi.py.lux b/stdlib/source/documentation/lux/ffi.py.lux index 033e32386..295722b65 100644 --- a/stdlib/source/documentation/lux/ffi.py.lux +++ b/stdlib/source/documentation/lux/ffi.py.lux @@ -10,9 +10,9 @@ [\\library ["[0]" /]]) -(documentation: /.import: +(documentation: /.import "Easily import types, methods, functions and constants." - [(import: os + [(import os "[1]::[0]" ("static" F_OK Integer) ("static" R_OK Integer) @@ -26,7 +26,7 @@ ("static" rename [String String] "io" "try" "?" Any) ("static" listdir [String] "io" "try" (Array String))) - (import: os/path + (import os/path "[1]::[0]" ("static" isfile [String] "io" "try" Boolean) ("static" isdir [String] "io" "try" Boolean) @@ -46,7 +46,7 @@ (.List $.Module) ($.module /._ "" - [..import: + [..import ..lambda ($.default (/.Object brand)) ($.default /.None) diff --git a/stdlib/source/documentation/lux/ffi.rb.lux b/stdlib/source/documentation/lux/ffi.rb.lux index f70412a68..eb554d527 100644 --- a/stdlib/source/documentation/lux/ffi.rb.lux +++ b/stdlib/source/documentation/lux/ffi.rb.lux @@ -10,14 +10,14 @@ [\\library ["[0]" /]]) -(documentation: /.import: +(documentation: /.import "Easily import types, methods, functions and constants." - [(import: Stat + [(import Stat "[1]::[0]" (executable? [] Bit) (size Int)) - (import: File "as" RubyFile + (import File "as" RubyFile "[1]::[0]" ("static" SEPARATOR ..String) ("static" open [Path ..String] "io" "try" RubyFile) @@ -35,7 +35,7 @@ (.List $.Module) ($.module /._ "" - [..import: + [..import ($.default (/.Object brand)) ($.default /.Nil) ($.default /.Function) diff --git a/stdlib/source/documentation/lux/macro/syntax.lux b/stdlib/source/documentation/lux/macro/syntax.lux index 2cc4ffcb9..525777d61 100644 --- a/stdlib/source/documentation/lux/macro/syntax.lux +++ b/stdlib/source/documentation/lux/macro/syntax.lux @@ -19,7 +19,7 @@ ["[0]" /]]) (documentation: /.syntax: - (format \n "A more advanced way to define macros than 'macro:'." + (format \n "A more advanced way to define macros than 'macro'." \n "The inputs to the macro can be parsed in complex ways through the use of syntax parsers." \n "The macro body is also (implicitly) run in the Meta monad, to save some typing." \n "Also, the compiler state can be accessed through a special binding.") |