Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Comment = Located Text
- data Located a
- parseComments :: Language -> Text -> [Comment]
- commentText :: Comment -> Text
- startLine :: Located a -> Int
- endLine :: Comment -> Int
- newComment :: Int -> Text -> Comment
- parseComments' :: [SourceLine] -> [Comment]
- type Language = Text
- languageForFile :: Text -> Maybe Language
- highlightCode :: Language -> Text -> [SourceLine]
Understand comments
A thing that is located somewhere in a text file.
parseComments :: Language -> Text -> [Comment] Source #
Given some source code, return a list of comments.
commentText :: Comment -> Text Source #
Exposed for testing
parseComments' :: [SourceLine] -> [Comment] Source #
Given a consecutive sequence of lexed lines of source, return a list of all the comments found, along with the line number on which the comment starts.
Understand programming languages
Exposed for testing
highlightCode :: Language -> Text -> [SourceLine] Source #