diff options
Diffstat (limited to 'stdlib/source/documentation/lux/data')
4 files changed, 355 insertions, 210 deletions
diff --git a/stdlib/source/documentation/lux/data/color/named.lux b/stdlib/source/documentation/lux/data/color/named.lux index 4ed4c3324..5e884b82c 100644 --- a/stdlib/source/documentation/lux/data/color/named.lux +++ b/stdlib/source/documentation/lux/data/color/named.lux @@ -4,7 +4,9 @@ ["$" documentation] [data ["[0]" text (.only) - ["%" \\format (.only format)]]] + ["%" \\format (.only format)]] + [collection + ["[0]" list (.use "[1]#[0]" monoid)]]] [math [number ["[0]" nat (.use "hex#[0]" hex)]]]]] @@ -12,41 +14,21 @@ ["[0]" / (.only) ["/[1]" //]]]) -(`` (def .public documentation - (List $.Documentation) - (list ($.module /._ - "") +(def description + (template (_ <name>) + [($.definition <name> + (let [[red green blue] (//.rgb <name>) + [_ name] (symbol <name>)] + (format "R:" (hex#encoded red) + " G:" (hex#encoded green) + " B:" (hex#encoded blue) + " | " (text.replaced "_" " " name))))])) - (,, (with_template [<name>] - [($.definition <name> - (let [[red green blue] (//.rgb <name>) - [_ name] (symbol <name>)] - (format "R:" (hex#encoded red) - " G:" (hex#encoded green) - " B:" (hex#encoded blue) - " | " (text.replaced "_" " " name))))] +(`` (def colors/d-k + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] - [/.alice_blue] - [/.antique_white] - [/.aqua] - [/.aquamarine] - [/.azure] - [/.beige] - [/.bisque] - [/.black] - [/.blanched_almond] - [/.blue] - [/.blue_violet] - [/.brown] - [/.burly_wood] - [/.cadet_blue] - [/.chartreuse] - [/.chocolate] - [/.coral] - [/.cornflower_blue] - [/.cornsilk] - [/.crimson] - [/.cyan] [/.dark_blue] [/.dark_cyan] [/.dark_goldenrod] @@ -85,6 +67,14 @@ [/.indigo] [/.ivory] [/.khaki] + )) + ))) + +(`` (def colors/l-o + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] + [/.lavender] [/.lavender_blush] [/.lawn_green] @@ -128,6 +118,14 @@ [/.orange] [/.orange_red] [/.orchid] + )) + ))) + +(`` (def colors/p-y + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] + [/.pale_goldenrod] [/.pale_green] [/.pale_turquoise] @@ -169,3 +167,79 @@ [/.yellow_green] )) ))) + +(`` (def .public documentation + (List $.Documentation) + (list.partial ($.module /._ + "") + + (,, (with_template [<name>] + [(description <name>)] + + [/.alice_blue] + [/.antique_white] + [/.aqua] + [/.aquamarine] + [/.azure] + [/.beige] + [/.bisque] + [/.black] + [/.blanched_almond] + [/.blue] + [/.blue_violet] + [/.brown] + [/.burly_wood] + [/.cadet_blue] + [/.chartreuse] + [/.chocolate] + [/.coral] + [/.cornflower_blue] + [/.cornsilk] + [/.crimson] + [/.cyan] + [/.dark_blue] + [/.dark_cyan] + [/.dark_goldenrod] + [/.dark_gray] + [/.dark_green] + [/.dark_khaki] + [/.dark_magenta] + [/.dark_olive_green] + [/.dark_orange] + [/.dark_orchid] + [/.dark_red] + [/.dark_salmon] + [/.dark_sea_green] + [/.dark_slate_blue] + [/.dark_slate_gray] + [/.dark_turquoise] + [/.dark_violet] + [/.deep_pink] + [/.deep_sky_blue] + [/.dim_gray] + [/.dodger_blue] + [/.fire_brick] + [/.floral_white] + [/.forest_green] + [/.fuchsia] + [/.gainsboro] + [/.ghost_white] + [/.gold] + [/.goldenrod] + [/.gray] + [/.green] + [/.green_yellow] + [/.honey_dew] + [/.hot_pink] + [/.indian_red] + [/.indigo] + [/.ivory] + [/.khaki] + )) + + (all list#composite + colors/d-k + colors/l-o + colors/p-y + ) + ))) diff --git a/stdlib/source/documentation/lux/data/text/encoding.lux b/stdlib/source/documentation/lux/data/text/encoding.lux index e5e324f22..f370ef501 100644 --- a/stdlib/source/documentation/lux/data/text/encoding.lux +++ b/stdlib/source/documentation/lux/data/text/encoding.lux @@ -6,12 +6,180 @@ [text (.only \n) ["%" \\format (.only format)]] [collection - ["[0]" list]]]]] + ["[0]" list (.use "[1]#[0]" monoid)]]]]] [\\library ["[0]" /]] ["[0]" / ["[1][0]" utf8]]) +(def description + (template (_ <name>) + [($.definition <name> + (format "'" (/.name <name>) "' text encoding. "))])) + +(`` (def all/ibm + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] + + [/.ibm_037] + [/.ibm_273] + [/.ibm_277] + [/.ibm_278] + [/.ibm_280] + [/.ibm_284] + [/.ibm_285] + [/.ibm_290] + [/.ibm_297] + [/.ibm_300] + [/.ibm_420] + [/.ibm_424] + [/.ibm_437] + [/.ibm_500] + [/.ibm_737] + [/.ibm_775] + [/.ibm_833] + [/.ibm_834] + [/.ibm_838] + [/.ibm_850] + [/.ibm_852] + [/.ibm_855] + [/.ibm_856] + [/.ibm_857] + [/.ibm_858] + [/.ibm_860] + [/.ibm_861] + [/.ibm_862] + [/.ibm_863] + [/.ibm_864] + [/.ibm_865] + [/.ibm_866] + [/.ibm_868] + [/.ibm_869] + [/.ibm_870] + [/.ibm_871] + [/.ibm_874] + [/.ibm_875] + [/.ibm_918] + [/.ibm_921] + [/.ibm_922] + [/.ibm_930] + [/.ibm_933] + [/.ibm_935] + [/.ibm_937] + [/.ibm_939] + [/.ibm_942] + [/.ibm_942c] + [/.ibm_943] + [/.ibm_943c] + [/.ibm_948] + [/.ibm_949] + [/.ibm_949c] + [/.ibm_950] + [/.ibm_964] + [/.ibm_970] + [/.ibm_1006] + [/.ibm_1025] + [/.ibm_1026] + [/.ibm_1046] + [/.ibm_1047] + [/.ibm_1097] + [/.ibm_1098] + [/.ibm_1112] + [/.ibm_1122] + [/.ibm_1123] + [/.ibm_1124] + [/.ibm_1140] + [/.ibm_1141] + [/.ibm_1142] + [/.ibm_1143] + [/.ibm_1144] + [/.ibm_1145] + [/.ibm_1146] + [/.ibm_1147] + [/.ibm_1148] + [/.ibm_1149] + [/.ibm_1166] + [/.ibm_1364] + [/.ibm_1381] + [/.ibm_1383] + [/.ibm_33722] + )) + ))) + +(`` (def all/iso-mac + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] + + [/.iso_2022_cn] + [/.iso2022_cn_cns] + [/.iso2022_cn_gb] + [/.iso_2022_jp] + [/.iso_2022_jp_2] + [/.iso_2022_kr] + [/.iso_8859_1] + [/.iso_8859_2] + [/.iso_8859_3] + [/.iso_8859_4] + [/.iso_8859_5] + [/.iso_8859_6] + [/.iso_8859_7] + [/.iso_8859_8] + [/.iso_8859_9] + [/.iso_8859_11] + [/.iso_8859_13] + [/.iso_8859_15] + + [/.mac_arabic] + [/.mac_central_europe] + [/.mac_croatian] + [/.mac_cyrillic] + [/.mac_dingbat] + [/.mac_greek] + [/.mac_hebrew] + [/.mac_iceland] + [/.mac_roman] + [/.mac_romania] + [/.mac_symbol] + [/.mac_thai] + [/.mac_turkish] + [/.mac_ukraine] + )) + ))) + +(`` (def all/utf-koi8 + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] + + [/.utf_8] + [/.utf_16] + [/.utf_32] + + [/.windows_31j] + [/.windows_874] + [/.windows_949] + [/.windows_950] + [/.windows_1250] + [/.windows_1252] + [/.windows_1251] + [/.windows_1253] + [/.windows_1254] + [/.windows_1255] + [/.windows_1256] + [/.windows_1257] + [/.windows_1258] + [/.windows_iso2022jp] + [/.windows_50220] + [/.windows_50221] + + [/.cesu_8] + [/.koi8_r] + [/.koi8_u] + )) + ))) + (`` (def .public documentation (List $.Documentation) (list.partial ($.module /._ @@ -23,153 +191,15 @@ "Encoding formats for text.") (,, (with_template [<name>] - [($.definition <name> - (format "'" (/.name <name>) "' text encoding. "))] + [(description <name>)] [/.ascii] - - [/.ibm_037] - [/.ibm_273] - [/.ibm_277] - [/.ibm_278] - [/.ibm_280] - [/.ibm_284] - [/.ibm_285] - [/.ibm_290] - [/.ibm_297] - [/.ibm_300] - [/.ibm_420] - [/.ibm_424] - [/.ibm_437] - [/.ibm_500] - [/.ibm_737] - [/.ibm_775] - [/.ibm_833] - [/.ibm_834] - [/.ibm_838] - [/.ibm_850] - [/.ibm_852] - [/.ibm_855] - [/.ibm_856] - [/.ibm_857] - [/.ibm_858] - [/.ibm_860] - [/.ibm_861] - [/.ibm_862] - [/.ibm_863] - [/.ibm_864] - [/.ibm_865] - [/.ibm_866] - [/.ibm_868] - [/.ibm_869] - [/.ibm_870] - [/.ibm_871] - [/.ibm_874] - [/.ibm_875] - [/.ibm_918] - [/.ibm_921] - [/.ibm_922] - [/.ibm_930] - [/.ibm_933] - [/.ibm_935] - [/.ibm_937] - [/.ibm_939] - [/.ibm_942] - [/.ibm_942c] - [/.ibm_943] - [/.ibm_943c] - [/.ibm_948] - [/.ibm_949] - [/.ibm_949c] - [/.ibm_950] - [/.ibm_964] - [/.ibm_970] - [/.ibm_1006] - [/.ibm_1025] - [/.ibm_1026] - [/.ibm_1046] - [/.ibm_1047] - [/.ibm_1097] - [/.ibm_1098] - [/.ibm_1112] - [/.ibm_1122] - [/.ibm_1123] - [/.ibm_1124] - [/.ibm_1140] - [/.ibm_1141] - [/.ibm_1142] - [/.ibm_1143] - [/.ibm_1144] - [/.ibm_1145] - [/.ibm_1146] - [/.ibm_1147] - [/.ibm_1148] - [/.ibm_1149] - [/.ibm_1166] - [/.ibm_1364] - [/.ibm_1381] - [/.ibm_1383] - [/.ibm_33722] - - [/.iso_2022_cn] - [/.iso2022_cn_cns] - [/.iso2022_cn_gb] - [/.iso_2022_jp] - [/.iso_2022_jp_2] - [/.iso_2022_kr] - [/.iso_8859_1] - [/.iso_8859_2] - [/.iso_8859_3] - [/.iso_8859_4] - [/.iso_8859_5] - [/.iso_8859_6] - [/.iso_8859_7] - [/.iso_8859_8] - [/.iso_8859_9] - [/.iso_8859_11] - [/.iso_8859_13] - [/.iso_8859_15] - - [/.mac_arabic] - [/.mac_central_europe] - [/.mac_croatian] - [/.mac_cyrillic] - [/.mac_dingbat] - [/.mac_greek] - [/.mac_hebrew] - [/.mac_iceland] - [/.mac_roman] - [/.mac_romania] - [/.mac_symbol] - [/.mac_thai] - [/.mac_turkish] - [/.mac_ukraine] - - [/.utf_8] - [/.utf_16] - [/.utf_32] - - [/.windows_31j] - [/.windows_874] - [/.windows_949] - [/.windows_950] - [/.windows_1250] - [/.windows_1252] - [/.windows_1251] - [/.windows_1253] - [/.windows_1254] - [/.windows_1255] - [/.windows_1256] - [/.windows_1257] - [/.windows_1258] - [/.windows_iso2022jp] - [/.windows_50220] - [/.windows_50221] - - [/.cesu_8] - [/.koi8_r] - [/.koi8_u] )) - /utf8.documentation + (all list#composite + all/ibm + all/iso-mac + all/utf-koi8 + /utf8.documentation + ) ))) diff --git a/stdlib/source/documentation/lux/data/text/regex.lux b/stdlib/source/documentation/lux/data/text/regex.lux index 090b88c41..8de3d70e7 100644 --- a/stdlib/source/documentation/lux/data/text/regex.lux +++ b/stdlib/source/documentation/lux/data/text/regex.lux @@ -63,7 +63,7 @@ ($.definition /.pattern "Allows you to test text against regular expressions." - [(case some_text + [(when some_text (pattern "(\d{3})-(\d{3})-(\d{4})" [_ country_code area_code place_code]) do_some_thing_when_number diff --git a/stdlib/source/documentation/lux/data/text/unicode/block.lux b/stdlib/source/documentation/lux/data/text/unicode/block.lux index 7aa0355ab..78002e97c 100644 --- a/stdlib/source/documentation/lux/data/text/unicode/block.lux +++ b/stdlib/source/documentation/lux/data/text/unicode/block.lux @@ -4,42 +4,27 @@ ["$" documentation] [data ["[0]" text (.only) - ["%" \\format (.only format)]]] + ["%" \\format (.only format)]] + [collection + ["[0]" list (.use "[1]#[0]" monoid)]]] [math [number ["[0]" nat (.use "hex#[0]" hex)]]]]] [\\library ["[0]" /]]) -(`` (def .public documentation - (List $.Documentation) - (list ($.module /._ - "") - - ($.definition /.monoid) - ($.definition /.start) - ($.definition /.end) - ($.definition /.size) - ($.definition /.equivalence) - ($.definition /.hash) - - ($.definition /.Block - "A block of valid unicode characters.") - - ($.definition /.block - "" - [(block start additional)]) +(def description + (template (_ <name>) + [($.definition <name> + (let [[_ name] (symbol <name>)] + (format (hex#encoded (/.start <name>)) + "-" (hex#encoded (/.end <name>)) + " | " (text.replaced "_" " " name))))])) - ($.definition /.within? - "" - [(within? block char)]) - - (,, (with_template [<name>] - [($.definition <name> - (let [[_ name] (symbol <name>)] - (format (hex#encoded (/.start <name>)) - "-" (hex#encoded (/.end <name>)) - " | " (text.replaced "_" " " name))))] +(`` (def all_1/4 + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] [/.basic_latin] [/.latin_1_supplement] @@ -74,6 +59,14 @@ [/.hangul_jamo] [/.ethiopic] [/.cherokee] + )) + ))) + +(`` (def all_2/4 + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] + [/.unified_canadian_aboriginal_syllabics] [/.ogham] [/.runic] @@ -93,6 +86,15 @@ [/.superscripts_and_subscripts] [/.currency_symbols] [/.combining_diacritical_marks_for_symbols] + )) + ))) + +(`` (def all_3/4 + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] + + [/.combining_diacritical_marks_for_symbols] [/.letterlike_symbols] [/.number_forms] [/.arrows] @@ -120,6 +122,14 @@ [/.hiragana] [/.katakana] [/.bopomofo] + )) + ))) + +(`` (def all_4/4 + (List $.Documentation) + (list (,, (with_template [<name>] + [(description <name>)] + [/.hangul_compatibility_jamo] [/.kanbun] [/.bopomofo_extended] @@ -151,3 +161,34 @@ [/.lower_case] )) ))) + +(def .public documentation + (List $.Documentation) + (list.partial ($.module /._ + "") + + ($.definition /.monoid) + ($.definition /.start) + ($.definition /.end) + ($.definition /.size) + ($.definition /.equivalence) + ($.definition /.hash) + + ($.definition /.Block + "A block of valid unicode characters.") + + ($.definition /.block + "" + [(block start additional)]) + + ($.definition /.within? + "" + [(within? block char)]) + + (all list#composite + all_1/4 + all_2/4 + all_3/4 + all_4/4 + ) + )) |