diff options
Diffstat (limited to 'new-luxc/source/luxc/lang.lux')
-rw-r--r-- | new-luxc/source/luxc/lang.lux | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/new-luxc/source/luxc/lang.lux b/new-luxc/source/luxc/lang.lux deleted file mode 100644 index f02af30c5..000000000 --- a/new-luxc/source/luxc/lang.lux +++ /dev/null @@ -1,44 +0,0 @@ -(.module: - lux - (lux (data [maybe] - [text] - text/format))) - -(def: (normalize-char char) - (-> Nat Text) - (case char - (^ (char "*")) "_ASTER_" - (^ (char "+")) "_PLUS_" - (^ (char "-")) "_DASH_" - (^ (char "/")) "_SLASH_" - (^ (char "\\")) "_BSLASH_" - (^ (char "_")) "_UNDERS_" - (^ (char "%")) "_PERCENT_" - (^ (char "$")) "_DOLLAR_" - (^ (char "'")) "_QUOTE_" - (^ (char "`")) "_BQUOTE_" - (^ (char "@")) "_AT_" - (^ (char "^")) "_CARET_" - (^ (char "&")) "_AMPERS_" - (^ (char "=")) "_EQ_" - (^ (char "!")) "_BANG_" - (^ (char "?")) "_QM_" - (^ (char ":")) "_COLON_" - (^ (char ".")) "_PERIOD_" - (^ (char ",")) "_COMMA_" - (^ (char "<")) "_LT_" - (^ (char ">")) "_GT_" - (^ (char "~")) "_TILDE_" - (^ (char "|")) "_PIPE_" - _ - (text.from-code char))) - -(def: underflow Nat (dec +0)) - -(def: #export (normalize-name name) - (-> Text Text) - (loop [idx (dec (text.size name)) - output ""] - (if (n/= underflow idx) - output - (recur (dec idx) (format (|> (text.nth idx name) maybe.assume normalize-char) output))))) |