| highlighting-kate-0.2.6.2: Syntax highlighting | Source code | Contents | Index

Text.Highlighting.Kate.Definitions

Portability | portable
Stability | alpha
Maintainer | John MacFarlane <jgm@berkeley.edu>

Description
Definitions for data structures needed by highlighting-kate.
Synopsis

type ContextStack = Map String [String]

data SyntaxState = SyntaxState {

synStContexts :: ContextStack
synStLanguage :: String
synStCurrentLine :: String
synStCharsParsedInLine :: Int
synStPrevChar :: Char
synStCaseSensitive :: Bool
synStKeywordCaseSensitive :: Bool
synStCaptures :: [String]

}

type LabeledSource = ([String], String)
type SourceLine = [LabeledSource]

Documentation

type ContextStack = Map String [String] | Source

A stack of context names for each language. (Language-specific context stacks must be maintained because of IncludeRules.)

data SyntaxState | Source

State for syntax parser.
Constructors

SyntaxState |

synStContexts :: ContextStack | Stack of contexts
synStLanguage :: String | Language being parsed
synStCurrentLine :: String | Contents of current line
synStCharsParsedInLine :: Int | Num characters parsed in line
synStPrevChar :: Char | Last character parsed
synStCaseSensitive :: Bool | Language is case-sensitive
synStKeywordCaseSensitive :: Bool | Keywords are case-sensitive
synStCaptures :: [String] | List of regex captures from last capturing match

Instances

Read SyntaxState
Show SyntaxState

type LabeledSource = ([String], String) | Source

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

type SourceLine = [LabeledSource] | Source

A line of source, list of labeled source items.
Produced by Haddock version 2.4.2