hydrogen-syntax-0.11: src/Hydrogen/Syntax/Types.hs
module Hydrogen.Syntax.Types where
import Hydrogen.Prelude
import Hydrogen.Parsing
type POPs = [(SourcePos, POP)]
data POP where
Token :: TokenType -> [Char] -> [Char] -> POP
Block :: BlockType -> [Char] -> POPs -> POP
deriving (Eq, Ord, Show, Typeable, Generic)
instance Serialize POP
data TokenType where
AposString :: TokenType
QuotString :: TokenType
TickString :: TokenType
SomethingT :: TokenType
deriving (Eq, Ord, Enum, Show, Typeable, Generic)
instance Serialize TokenType
data BlockType where
Grouping :: BlockType
Brackets :: BlockType
Mustache :: BlockType
deriving (Eq, Ord, Enum, Show, Typeable, Generic)
instance Serialize BlockType
data Token where
TComma :: Token
TSemicolon :: Token
TBraceOpen :: [Char] -> Char -> Token
TBraceClose :: Char -> Token
TSomething :: [Char] -> Token
TIndent :: Int -> Token
TSpaces :: Token
TString :: [Char] -> Char -> [Char] -> Token
deriving (Eq, Ord, Show, Typeable, Generic)
instance Serialize Token