Safe Haskell | None |
---|---|
Language | Haskell2010 |
- lexPlain :: String -> Either LexError [Token]
- unicodeTokenString :: Token -> String
- asciiTokenString :: Token -> String
- type Chunk = [Token]
- type Chunks = DList Chunk
- data FilePart
- lexInclude :: String -> IO (Either LexError [Token])
- lexInclude2 :: String -> EitherT LexError IO Chunks
- processPart :: FilePart -> EitherT LexError IO Chunks
- splitIncludes :: [Token] -> [Token] -> Either LexError [FilePart]
- scanInclude :: Token -> [Token] -> Either LexError [FilePart]
- removeIgnoredToken :: [Token] -> [Token]
- tokenIsComment :: Token -> Bool
- soakNewlines :: [Token] -> [Token]
Documentation
unicodeTokenString :: Token -> String Source
Convert a token to a String. If the tokenClasss has a Unicode symbol return the default Unicode string.
asciiTokenString :: Token -> String Source
Convert a token to a String. If the tokenClasss has a Unicode symbol return the default ASCII string.
lexInclude :: String -> IO (Either LexError [Token]) Source
lex input-string and inport all includes files
splitIncludes :: [Token] -> [Token] -> Either LexError [FilePart] Source
micro-parser for include-statements
removeIgnoredToken :: [Token] -> [Token] Source
Remove comments, whitespaces and unneeded newlines.
tokenIsComment :: Token -> Bool Source
Is the token a line-comment, block-comment or a Pragma?
soakNewlines :: [Token] -> [Token] Source
remove newlines, that do not end a declaration from the token stream. For example newlines next to binary operators. Remove all trailing newlines.