Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81248 / cToHtml / app
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/app
IPL-aeb0d4f887a0c18c36b59acc7b5df08e62020c50.tar
IPL-aeb0d4f887a0c18c36b59acc7b5df08e62020c50.tar.gz
IPL-aeb0d4f887a0c18c36b59acc7b5df08e62020c50.zip
Parent154b7cd30f21af1554ca26986ff1643e28857727 (diff)
Removed old homeworks
2 files changed, 0 insertions, 29 deletions
-rw-r--r--homework/81248/cToHtml/app/.Main.hs.swpbin12288 -> 0 bytes
-rw-r--r--homework/81248/cToHtml/app/Main.hs29
diff --git a/homework/81248/cToHtml/app/.Main.hs.swp b/homework/81248/cToHtml/app/.Main.hs.swp
deleted file mode 100644
index d6ddc14..0000000
--- a/homework/81248/cToHtml/app/.Main.hs.swp
+++ /dev/null
Binary files differ
diff --git a/homework/81248/cToHtml/app/Main.hs b/homework/81248/cToHtml/app/Main.hs
deleted file mode 100644
index b504b82..0000000
--- a/homework/81248/cToHtml/app/Main.hs
+++ /dev/null
@@ -1,29 +0,0 @@
-module Main
- ( main
- ) where
-
-import qualified Data.ByteString as BS
-
-import System.Environment (getArgs)
-
-import Lucid (renderToFile)
-
-import Clex.Lex (lexC)
-import Html (cToHtml)
-
-main :: IO ()
-main = do
- xs <- getArgs
- if length xs /= 3
- then putStrLn usage
- else do
- let [inFile, outFile, col] = xs
- file <- BS.readFile inFile
- renderToFile outFile $ cToHtml col $ either fail id $ lexC file
-
-usage :: String
-usage = " \nUsage: cToHtml inFile.c outFile.html <colour>\n\
- \ Converts inFile.c to a colourised version in which all\n\
- \ keywords, identifiers and literals are coloured in <colour>.\n\
- \ We rely on <colour> working in a style tag.\n\
- \ (we basically set \"color:<colour>\" as a style)\n"