never executed always true always false
    1 module HelVM.HelMA.Automata.WhiteSpace.Lexer where
    2 
    3 import           HelVM.HelMA.Automata.WhiteSpace.Token
    4 
    5 import           HelVM.HelIO.ReadText
    6 import           HelVM.HelMA.Automaton.API.IOTypes
    7 import           HelVM.HelMA.Automaton.Types.TokenType
    8 import           HelVM.HelMA.Automaton.WrapTokenList
    9 
   10 -- | Lexer
   11 
   12 tokenize :: TokenType -> Source -> TokenList
   13 tokenize VisibleTokenType = tokenizeVisible
   14 tokenize _                = tokenizeWhite
   15 
   16 tokenizeVisible :: Source -> TokenList
   17 tokenizeVisible = unWrapTokenList . readVisibleTokens
   18 
   19 tokenizeWhite :: Source -> TokenList
   20 tokenizeWhite = whiteTokenListToTokenList . unWrapTokenList . readWhiteTokens
   21 
   22 readVisibleTokens :: Source -> VisibleTokens
   23 readVisibleTokens source = readTextUnsafe source :: VisibleTokens
   24 
   25 readWhiteTokens :: Source -> WhiteTokens
   26 readWhiteTokens source = readTextUnsafe source :: WhiteTokens
   27 
   28 type VisibleTokens = WrapTokenList TokenList
   29 
   30 type WhiteTokens = WrapTokenList WhiteTokenList