Copyright | Copyright (C) 2008 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Text.Highlighting.Kate.Types
Description
Definitions for data structures needed by highlighting-kate.
Synopsis
- type Context = (String, String)
- type ContextStack = [Context]
- data SyntaxState = SyntaxState {}
- defaultSyntaxState :: SyntaxState
- type Token = (TokenType, String)
- data TokenType
- = KeywordTok
- | DataTypeTok
- | DecValTok
- | BaseNTok
- | FloatTok
- | ConstantTok
- | CharTok
- | SpecialCharTok
- | StringTok
- | VerbatimStringTok
- | SpecialStringTok
- | ImportTok
- | CommentTok
- | DocumentationTok
- | AnnotationTok
- | CommentVarTok
- | OtherTok
- | FunctionTok
- | VariableTok
- | ControlFlowTok
- | OperatorTok
- | BuiltInTok
- | ExtensionTok
- | PreprocessorTok
- | AttributeTok
- | RegionMarkerTok
- | InformationTok
- | WarningTok
- | AlertTok
- | ErrorTok
- | NormalTok
- type SourceLine = [Token]
- type KateParser = GenParser Char SyntaxState
- data TokenStyle = TokenStyle {}
- defStyle :: TokenStyle
- data Color = RGB Word8 Word8 Word8
- class ToColor a where
- class FromColor a where
- data Style = Style {}
- data FormatOptions = FormatOptions {
- numberLines :: Bool
- startNumber :: Int
- lineAnchors :: Bool
- titleAttributes :: Bool
- codeClasses :: [String]
- containerClasses :: [String]
- defaultFormatOpts :: FormatOptions
Documentation
type ContextStack = [Context] Source #
A stack of contexts. (Language-specific context stacks must be maintained because of IncludeRules.)
data SyntaxState Source #
State for syntax parser.
Constructors
SyntaxState | |
Fields
|
Instances
Show SyntaxState Source # | |
Defined in Text.Highlighting.Kate.Types |
Constructors
Instances
type SourceLine = [Token] Source #
A line of source, list of labeled source items.
type KateParser = GenParser Char SyntaxState Source #
data TokenStyle Source #
Constructors
TokenStyle | |
Fields
|
Instances
Data TokenStyle Source # | |
Defined in Text.Highlighting.Kate.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TokenStyle -> c TokenStyle Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TokenStyle Source # toConstr :: TokenStyle -> Constr Source # dataTypeOf :: TokenStyle -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TokenStyle) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TokenStyle) Source # gmapT :: (forall b. Data b => b -> b) -> TokenStyle -> TokenStyle Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TokenStyle -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TokenStyle -> r Source # gmapQ :: (forall d. Data d => d -> u) -> TokenStyle -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> TokenStyle -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TokenStyle -> m TokenStyle Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenStyle -> m TokenStyle Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TokenStyle -> m TokenStyle Source # | |
Read TokenStyle Source # | |
Defined in Text.Highlighting.Kate.Types | |
Show TokenStyle Source # | |
Defined in Text.Highlighting.Kate.Types |
Instances
Data Color Source # | |
Defined in Text.Highlighting.Kate.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Color -> c Color Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Color Source # toConstr :: Color -> Constr Source # dataTypeOf :: Color -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Color) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Color) Source # gmapT :: (forall b. Data b => b -> b) -> Color -> Color Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Color -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Color -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Color -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Color -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Color -> m Color Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Color -> m Color Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Color -> m Color Source # | |
Read Color Source # | |
Show Color Source # | |
Constructors
Style | |
Fields |
Instances
Data Style Source # | |
Defined in Text.Highlighting.Kate.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Style -> c Style Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Style Source # toConstr :: Style -> Constr Source # dataTypeOf :: Style -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Style) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Style) Source # gmapT :: (forall b. Data b => b -> b) -> Style -> Style Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Style -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Style -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Style -> m Style Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style Source # | |
Read Style Source # | |
Show Style Source # | |
data FormatOptions Source #
Options for formatting source code.
Constructors
FormatOptions | |
Fields
|
Instances
Read FormatOptions Source # | |
Defined in Text.Highlighting.Kate.Types | |
Show FormatOptions Source # | |
Defined in Text.Highlighting.Kate.Types | |
Eq FormatOptions Source # | |
Defined in Text.Highlighting.Kate.Types Methods (==) :: FormatOptions -> FormatOptions -> Bool Source # (/=) :: FormatOptions -> FormatOptions -> Bool Source # |