diff options
author | Eduardo Julian | 2022-06-12 00:38:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-12 00:38:20 -0400 |
commit | b48ea68a83d01903554c7696c77eedaaf1035680 (patch) | |
tree | c342d8094c3158de16526f874ca9624418cd2dd2 /stdlib/source/documentation/lux.lux | |
parent | 7abf2d0ac55c229a8793bbff31f132596ffcb275 (diff) |
De-sigil-ification: suffix : [Part 3]
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/documentation/lux.lux | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 59a5159b4..25389845a 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -284,7 +284,7 @@ (documentation: /.template "" ["By specifying a pattern (with holes), and the input data to fill those holes, repeats the pattern as many times as necessary." - (template [<name> <diff>] + (with_template [<name> <diff>] [(def: .public <name> (-> Int Int) (+ <diff>))] @@ -433,9 +433,9 @@ [(def: .public symbol (macro (_ tokens) (case tokens - (^template [<tag>] - [(pattern (list [_ {<tag> [module name]}])) - (in (list (` [(~ (text$ module)) (~ (text$ name))])))]) + (^with_template [<tag>] + [(pattern (list [_ {<tag> [module name]}])) + (in (list (` [(~ (text$ module)) (~ (text$ name))])))]) ([#Symbol]) _ @@ -516,7 +516,7 @@ (is (-> a a Bit) <)))]) -(.template [<name>] +(.with_template [<name>] [(documentation: <name> "Safe type-casting for I64 values.")] @@ -642,17 +642,17 @@ ... {.#Primitive name params} ... {.#Primitive name (list#each (reduced env) params)} -... (^template [<tag>] +... (^with_template [<tag>] ... [{<tag> left right} ... {<tag> (reduced env left) (reduced env right)}]) ... ([.#Sum] [.#Product]) -... (^template [<tag>] +... (^with_template [<tag>] ... [{<tag> left right} ... {<tag> (reduced env left) (reduced env right)}]) ... ([.#Function] [.#Apply]) -... (^template [<tag>] +... (^with_template [<tag>] ... [{<tag> old_env def} ... (case old_env ... {.#End} @@ -669,7 +669,7 @@ ... type ... ))]) -(.template [<name> <doc>] +(.with_template [<name> <doc>] [(documentation: <name> <doc>)] @@ -699,7 +699,7 @@ [(def: test Test (with_expansions - [<tests> (template [<function> <parameter> <expected>] + [<tests> (with_template [<function> <parameter> <expected>] [(cover [<function>] (compare <text> (at codec encoded <function> <parameter>)))] @@ -825,11 +825,12 @@ "==" Int]) -(documentation: /.template: - (format "Define macros in the style of template and ^template." +(documentation: /.template + (format "Define macros in the style of with_template." \n "For simple macros that do not need any fancy features.") - [(template: (square x) - (* x x))]) + [(def: square + (template (square x) + (* x x)))]) (documentation: /.these (format "Given a (potentially empty) list of codes, just returns them immediately, without any work done." @@ -999,7 +1000,7 @@ ..as_expected ..undefined ..type_of - ..template: + ..template ..these ..char ..for |