aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/macro/template.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-06-27 01:24:36 -0400
committerEduardo Julian2022-06-27 01:24:36 -0400
commitf0c5b0eae885b73de243cb463b017a20cb47646d (patch)
tree0ce0130eea39f8c568a954c28115e9ec569569cc /stdlib/source/documentation/lux/macro/template.lux
parent853d28f803e75d125915a81dcdcd140513efe3d2 (diff)
Extensible un-quoting.
Diffstat (limited to '')
-rw-r--r--stdlib/source/documentation/lux/macro/template.lux100
1 files changed, 47 insertions, 53 deletions
diff --git a/stdlib/source/documentation/lux/macro/template.lux b/stdlib/source/documentation/lux/macro/template.lux
index 3b4733cce..e75bbfbd9 100644
--- a/stdlib/source/documentation/lux/macro/template.lux
+++ b/stdlib/source/documentation/lux/macro/template.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except let symbol)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
[text (.only \n)
["%" \\format (.only format)]]
@@ -10,62 +10,56 @@
[\\library
["[0]" /]])
-(documentation: /.spliced
- ""
- [(spliced [a b c d])
- "=>"
- a
- b
- c
- d])
+(.def .public documentation
+ (.List $.Module)
+ ($.module /._
+ "Utilities commonly used while templating."
+ [($.default /.irregular_arguments)
-(documentation: /.amount
- ""
- [(amount [a b c d])
- "=>"
- 4])
+ ($.documentation /.spliced
+ ""
+ [(spliced [a b c d])
+ "=>"
+ a
+ b
+ c
+ d])
-(documentation: /.with_locals
- "Creates names for local bindings aliased by the names you choose."
- [(with_locals [my_var]
- (let [my_var 123]
- (text [my_var])))
- "=>"
- "__gensym__my_var506"])
+ ($.documentation /.amount
+ ""
+ [(amount [a b c d])
+ "=>"
+ 4])
-(documentation: /.text
- "A text literal made by concatenating pieces of code."
- [(text [#0 123 +456 +789.0 "abc" .def ..ghi])
- "=>"
- "#0123+456+789.0abcdefghi"])
+ ($.documentation /.with_locals
+ "Creates names for local bindings aliased by the names you choose."
+ [(with_locals [my_var]
+ (let [my_var 123]
+ (text [my_var])))
+ "=>"
+ "__gensym__my_var506"])
-(documentation: /.symbol
- (format "An symbol made by concatenating pieces of code."
- \n "The (optional) module part and the short part are specified independently.")
- [(symbol ["abc" .def ..ghi])
- "=>"
- abcdefghi]
- [(symbol [.def] ["abc" .def ..ghi])
- "=>"
- .abcdefghi])
+ ($.documentation /.text
+ "A text literal made by concatenating pieces of code."
+ [(text [#0 123 +456 +789.0 "abc" .def ..ghi])
+ "=>"
+ "#0123+456+789.0abcdefghi"])
-(documentation: /.let
- "Lexically-bound templates."
- [(let [(!square <root>)
- [(* <root> <root>)]]
- (def (square root)
- (-> Nat Nat)
- (!square root)))])
+ ($.documentation /.symbol
+ (format "An symbol made by concatenating pieces of code."
+ \n "The (optional) module part and the short part are specified independently.")
+ [(symbol ["abc" .def ..ghi])
+ "=>"
+ abcdefghi]
+ [(symbol [.def] ["abc" .def ..ghi])
+ "=>"
+ .abcdefghi])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- "Utilities commonly used while templating."
- [..spliced
- ..amount
- ..with_locals
- ..text
- ..symbol
- ..let
- ($.default /.irregular_arguments)]
+ ($.documentation /.let
+ "Lexically-bound templates."
+ [(let [(!square <root>)
+ [(* <root> <root>)]]
+ (def (square root)
+ (-> Nat Nat)
+ (!square root)))])]
[]))