Copyright | (c) 2019-2021 Vaclav Svejcar |
---|---|
License | BSD-3-Clause |
Maintainer | vaclav.svejcar@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Data types for Headroom.FileSupport module in separated module (to avoid cyclic dependencies).
Synopsis
- data FileSupport = FileSupport {}
- data SyntaxAnalysis = SyntaxAnalysis {
- saIsCommentStart :: Text -> Bool
- saIsCommentEnd :: Text -> Bool
- defaultFileSupport :: FileType -> SyntaxAnalysis -> FileSupport
- type ExtractTemplateDataFn = forall a. Template a => a -> HeaderSyntax -> TemplateData
- type ExtractVariablesFn = HeaderTemplate -> Maybe (Int, Int) -> SourceCode -> Variables
Data Types
data FileSupport Source #
Set of functions that every file support needs to implement.
data SyntaxAnalysis Source #
Set of functions used to analyze source code.
SyntaxAnalysis | |
|
Smart Constructors
:: FileType | type of the source code file |
-> SyntaxAnalysis | function that analyzes source code |
-> FileSupport | resulting |
Default implementation of FileSupport
that doesn't extract any variables
or template data.
Function Type Aliases
type ExtractTemplateDataFn Source #
= forall a. Template a | |
=> a | template to use for extraction |
-> HeaderSyntax | copyright header syntax |
-> TemplateData | extracted template data |
Type of a function that extracts additional template data from template.
type ExtractVariablesFn Source #
= HeaderTemplate | header template |
-> Maybe (Int, Int) | header position as |
-> SourceCode | analyzed source code file |
-> Variables | extracted variables |
Type of a function that extracts variables from analyzed source code file.