skylighting-core-0.7.7: syntax highlighting library

Safe HaskellNone
LanguageHaskell2010

Skylighting.Parser

Synopsis

Documentation

parseSyntaxDefinition :: FilePath -> IO (Either String Syntax) Source #

Parses a file containing a Kate XML syntax definition into a Syntax description. Note that if the DOCTYPE contains a reference to the now-obsolete language.dtd, we remove it.

parseSyntaxDefinitionFromString Source #

Arguments

:: FilePath

used for short name

-> String 
-> IO (Either String Syntax) 

Parses a string containing a Kate XML syntax definition into a Syntax description. Note that if the DOCTYPE contains a reference to the now-obsolete language.dtd, we remove it.

addSyntaxDefinition :: Syntax -> SyntaxMap -> SyntaxMap Source #

Adds a syntax definition to a syntax map, replacing any existing definition with the same name.

missingIncludes :: [Syntax] -> [(Text, Text)] Source #

Scan a list of Syntaxs and make sure that IncludeRules never asks for a syntax not in this list. Produces a list of pairs where the first element is the including syntax name and the second element is the (missing) included syntax name. This is intended for sanity checks to avoid run-time errors.