parsers-0.12.4: Parsing combinators

Copyright | (C) 2011 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Text.Parser.Token.Highlight

Description

Highlighting isn't strictly a parsing concern, but it makes more sense to annotate a parser with highlighting information than to require someone to completely reimplement all of the combinators to add this functionality later when they need it.

Synopsis

- data Highlight
  - = EscapeCode
  - | Number
  - | Comment
  - | CharLiteral
  - | StringLiteral
  - | Constant
  - | Statement
  - | Special
  - | Symbol
  - | Identifier
  - | ReservedIdentifier
  - | Operator
  - | ReservedOperator
  - | Constructor
  - | ReservedConstructor
  - | ConstructorOperator
  - | ReservedConstructorOperator
  - | BadInput
  - | Unbound
  - | Layout
  - | MatchedSymbols
  - | LiterateComment
  - | LiterateSyntax

# Documentation

data Highlight #

Tags used by the `TokenParsing` `highlight` combinator.

Constructors

EscapeCode |
Number |
Comment |
CharLiteral |
StringLiteral |
Constant |
Statement |
Special |
Symbol |
Identifier |
ReservedIdentifier |
Operator |
ReservedOperator |
Constructor |
ReservedConstructor |
ConstructorOperator |
ReservedConstructorOperator |
BadInput |
Unbound |
Layout |
MatchedSymbols |
LiterateComment |
LiterateSyntax |

Instances

Bounded Highlight # |
Methods minBound :: Highlight # maxBound :: Highlight #
Enum Highlight # |
Methods succ :: Highlight -> Highlight # pred :: Highlight -> Highlight # toEnum :: Int -> Highlight # fromEnum :: Highlight -> Int # enumFrom :: Highlight -> [Highlight] # enumFromThen :: Highlight -> Highlight -> [Highlight] # enumFromTo :: Highlight -> Highlight -> [Highlight] # enumFromThenTo :: Highlight -> Highlight -> Highlight -> [Highlight] #
Eq Highlight # |
Methods (==) :: Highlight -> Highlight -> Bool # (/=) :: Highlight -> Highlight -> Bool #
Ord Highlight # |
Methods compare :: Highlight -> Highlight -> Ordering # (<) :: Highlight -> Highlight -> Bool # (<=) :: Highlight -> Highlight -> Bool # (>) :: Highlight -> Highlight -> Bool # (>=) :: Highlight -> Highlight -> Bool # max :: Highlight -> Highlight -> Highlight # min :: Highlight -> Highlight -> Highlight #
Read Highlight # |
Methods readsPrec :: Int -> ReadS Highlight # readList :: ReadS [Highlight] # readPrec :: ReadPrec Highlight # readListPrec :: ReadPrec [Highlight] #
Show Highlight # |
Methods showsPrec :: Int -> Highlight -> ShowS # show :: Highlight -> String # showList :: [Highlight] -> ShowS #