Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81248 / cToHtml / src / Html.hs
diff options
context:
space:
mode:
Commitaeb0d4f887a0c18c36b59acc7b5df08e62020c50 (patch)
Author
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2020-10-11 21:32:48 +0300
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2020-10-11 21:33:38 +0300
Filesb6abdc6e1810326b587f2a160f39570f1f568f27 /homework/81248/cToHtml/src/Html.hs
IPL-aeb0d4f887a0c18c36b59acc7b5df08e62020c50.tar
IPL-aeb0d4f887a0c18c36b59acc7b5df08e62020c50.tar.gz
IPL-aeb0d4f887a0c18c36b59acc7b5df08e62020c50.zip
Parent154b7cd30f21af1554ca26986ff1643e28857727 (diff)
Removed old homeworks
1 files changed, 0 insertions, 30 deletions
-rw-r--r--homework/81248/cToHtml/src/Html.hs30
diff --git a/homework/81248/cToHtml/src/Html.hs b/homework/81248/cToHtml/src/Html.hs
deleted file mode 100644
index 49c6eb1..0000000
--- a/homework/81248/cToHtml/src/Html.hs
+++ /dev/null
@@ -1,30 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE ExtendedDefaultRules #-}
-
-module Html
- ( cToHtml
- ) where
-
-import qualified Data.Text as T
-
-import Lucid
-
-import Clex.Types
-
-cToHtml :: String -> [Token] -> Html ()
-cToHtml col toks = pre_ $ foldMap (colourize col) toks
-
-colourize :: String -> Token -> Html ()
-colourize _ (Whitespace bs) = toHtmlRaw bs
-colourize _ (HexNumber bs) = toHtml bs
-colourize _ (OctNumber bs) = toHtml bs
-colourize _ (Number bs) = toHtml bs
-colourize _ (CharLit bs) = toHtml bs
-colourize _ (Scientific bs) = toHtml bs
-colourize _ (DotFloat bs) = toHtml bs
-colourize _ (LeadingDot bs) = toHtml bs
-colourize _ (StringLit bs) = toHtml bs
-colourize _ (Identifier bs) = toHtml bs
-colourize col x = span_ [style_ $ "color:" <> col'] $ toHtml $ tokenToBS x
- where col' = T.pack col