Portability | portable |
---|---|
Stability | alpha |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Safe Haskell | Safe-Inferred |
Text.Highlighting.Kate.Types
Description
Definitions for data structures needed by highlighting-kate.
- type Context = (String, String)
- type ContextStack = [Context]
- data SyntaxState = SyntaxState {
- synStContexts :: ContextStack
- synStLineNumber :: Int
- synStPrevChar :: Char
- synStPrevNonspace :: Bool
- synStCaseSensitive :: Bool
- synStKeywordCaseSensitive :: Bool
- synStCaptures :: [String]
- type Token = (TokenType, String)
- data TokenType
- = KeywordTok
- | DataTypeTok
- | DecValTok
- | BaseNTok
- | FloatTok
- | CharTok
- | StringTok
- | CommentTok
- | OtherTok
- | AlertTok
- | FunctionTok
- | RegionMarkerTok
- | ErrorTok
- | NormalTok
- type SourceLine = [Token]
- type KateParser = GenParser Char SyntaxState
- data TokenStyle = TokenStyle {
- tokenColor :: Maybe Color
- tokenBackground :: Maybe Color
- tokenBold :: Bool
- tokenItalic :: Bool
- tokenUnderline :: Bool
- defStyle :: TokenStyle
- data Color = RGB Word8 Word8 Word8
- class ToColor a where
- class FromColor a where
- data Style = Style {
- tokenStyles :: [(TokenType, TokenStyle)]
- defaultColor :: Maybe Color
- backgroundColor :: Maybe Color
- lineNumberColor :: Maybe Color
- lineNumberBackgroundColor :: Maybe Color
- data FormatOptions = FormatOptions {
- numberLines :: Bool
- startNumber :: Int
- lineAnchors :: Bool
- titleAttributes :: Bool
- codeClasses :: [String]
- containerClasses :: [String]
- defaultFormatOpts :: FormatOptions
Documentation
type Context = (String, String)
A context: pair of syntax name and context name.
type ContextStack = [Context]
A stack of contexts. (Language-specific context stacks must be maintained because of IncludeRules.)
data SyntaxState
State for syntax parser.
Constructors
SyntaxState | |
Fields
|
Instances
Read SyntaxState | |
Show SyntaxState |
data TokenType
type SourceLine = [Token]
A line of source, list of labeled source items.
type KateParser = GenParser Char SyntaxState
data TokenStyle
Constructors
TokenStyle | |
Fields
|
Instances
Read TokenStyle | |
Show TokenStyle |
class ToColor a where
class FromColor a where
data Style
Constructors
Style | |
Fields
|
data FormatOptions
Options for formatting source code.
Constructors
FormatOptions | |
Fields
|
Instances
Eq FormatOptions | |
Read FormatOptions | |
Show FormatOptions |