highlighting-kate-0.5.8.5: Syntax highlighting

Portabilityportable
Stabilityalpha
MaintainerJohn MacFarlane <jgm@berkeley.edu>
Safe HaskellSafe-Inferred

Text.Highlighting.Kate.Types

Description

Definitions for data structures needed by highlighting-kate.

Synopsis

Documentation

type Context = (String, String)Source

A context: pair of syntax name and context name.

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

synStContexts :: ContextStack

Stack of contexts

synStLineNumber :: Int

Number of current line

synStPrevChar :: Char

Last character parsed

synStPrevNonspace :: Bool

True if we've parsed a nonspace

synStCaseSensitive :: Bool

Language is case-sensitive

synStKeywordCaseSensitive :: Bool

Keywords are case-sensitive

synStCaptures :: [String]

List of regex captures from last capturing match

Instances

type Token = (TokenType, String)Source

A pair consisting of a list of attributes and some text.

type SourceLine = [Token]Source

A line of source, list of labeled source items.

data Color Source

Constructors

RGB Word8 Word8 Word8 

Instances

data FormatOptions Source

Options for formatting source code.

Constructors

FormatOptions 

Fields

numberLines :: Bool

Number lines

startNumber :: Int

Number of first line

lineAnchors :: Bool

Anchors on each line number

titleAttributes :: Bool

Html titles with token types

codeClasses :: [String]

Additional classes for Html code tag

containerClasses :: [String]

Additional classes for Html container tag (pre or table depending on numberLines)