Compare commits

..

No commits in common. "1f89316fdf7f9343232ff8644936c5db8461a705" and "cd5e094eca92fd43b5e8b609f530f13cb7ac637a" have entirely different histories.

3 changed files with 3 additions and 7 deletions

View file

@ -4,7 +4,6 @@
- JS - JS
- Doing our own tokenizer lol - Doing our own tokenizer lol
- [ ] swap from using `draft` to using `date` for determing draft status, lack of date = draft - [ ] swap from using `draft` to using `date` for determing draft status, lack of date = draft
- [ ] Fix timestamp(s) shown to use local offset instead of absolute time https://www.rfc-editor.org/rfc/rfc3339#section-4.2
- [ ] setup fingerprinting in file names for css and js - [ ] setup fingerprinting in file names for css and js
- setup lambdas via: https://hackage-content.haskell.org/package/mustache-2.4.3.1/docs/Text-Mustache.html#v:overText - setup lambdas via: https://hackage-content.haskell.org/package/mustache-2.4.3.1/docs/Text-Mustache.html#v:overText
- This may require a refactor of how we handle templates to use `object` instead of just using aeson integration from the mustache crate - This may require a refactor of how we handle templates to use `object` instead of just using aeson integration from the mustache crate
@ -19,7 +18,6 @@
- https://crates.io/crates/tree-sitter-highlight - https://crates.io/crates/tree-sitter-highlight
- Or potentially https://docs.rs/arborium/latest/arborium/ - Or potentially https://docs.rs/arborium/latest/arborium/
- Alternatively consider skylighting https://hackage.haskell.org/package/skylighting - Alternatively consider skylighting https://hackage.haskell.org/package/skylighting
- [ ] setup font subsetting (font file minimization)
- [ ] dev server setup (with live reloading) - [ ] dev server setup (with live reloading)
- https://hackage-content.haskell.org/package/warp-3.4.10 - https://hackage-content.haskell.org/package/warp-3.4.10
- https://hackage.haskell.org/package/file-embed - https://hackage.haskell.org/package/file-embed

View file

@ -12,7 +12,7 @@ import Control.Applicative (Alternative (many), optional, (<|>))
import Control.Monad.Trans.Class (MonadTrans (lift)) import Control.Monad.Trans.Class (MonadTrans (lift))
import Control.Monad.Trans.State (StateT, evalStateT, put) import Control.Monad.Trans.State (StateT, evalStateT, put)
import Data.Data (Proxy (Proxy)) import Data.Data (Proxy (Proxy))
import Data.Functor (void, (<&>)) import Data.Functor ((<&>))
import Data.Maybe (maybeToList) import Data.Maybe (maybeToList)
import Data.String (IsString (fromString)) import Data.String (IsString (fromString))
import Data.Void (Void) import Data.Void (Void)
@ -20,7 +20,7 @@ import Logger
import Text.Megaparsec (MonadParsec (notFollowedBy, try), ParseErrorBundle, ParsecT, Stream (tokensToChunk), anySingle, choice, parse, runParserT) import Text.Megaparsec (MonadParsec (notFollowedBy, try), ParseErrorBundle, ParsecT, Stream (tokensToChunk), anySingle, choice, parse, runParserT)
import qualified Text.Megaparsec as MP import qualified Text.Megaparsec as MP
import Text.Megaparsec.Char (char, digitChar, eol, hspace, letterChar, newline, string) import Text.Megaparsec.Char (char, digitChar, eol, hspace, letterChar, newline, string)
import Utilities.Parsing (Characters, ToChar (fromChar), ToText (fromText, toString, toText)) import Utilities.Parsing (Characters, ToText (fromText, toString, toText))
data Possibility = ExprAllowed | ExprNotAllowed deriving (Eq) data Possibility = ExprAllowed | ExprNotAllowed deriving (Eq)
@ -375,7 +375,7 @@ literal =
char '`' char '`'
pure $ TemplateTail $ fromText $ mconcat $ map toText $ contents pure $ TemplateTail $ fromText $ mconcat $ map toText $ contents
template_char :: Parser s m s template_char :: Parser s m s
template_char = fromText . toText <$> choice [try (string "$" <* (notFollowedBy $ char '{')), try (char '\\' *> ((try template_escape_seq) <|> not_escape_seq)), try ((optional $ char '\\') *> (eol)), (notFollowedBy (choice $ linebreak : (map (fromChar <$> char) "`\\$"))) *> source_char] template_char = fromText . toText <$> choice [try (string "$" <* (notFollowedBy $ char '{')), try (char '\\' *> ((try template_escape_seq) <|> not_escape_seq)), try ((optional $ char '\\') *> (eol)), source_char]
source_char = error "TODO" source_char = error "TODO"
template_escape_seq = error "TODO: TemplateEscapeSequence, prepend backslash" template_escape_seq = error "TODO: TemplateEscapeSequence, prepend backslash"
not_escape_seq = error "TODO: NotEscapeSequence, prepend backslash" not_escape_seq = error "TODO: NotEscapeSequence, prepend backslash"

View file

@ -19,11 +19,9 @@ class ToText t where
class ToChar c where class ToChar c where
toChar :: c -> Char toChar :: c -> Char
fromChar :: Char -> c
instance ToChar Char where instance ToChar Char where
toChar = id toChar = id
fromChar = id
instance Characters Text instance Characters Text