module Language.Egison.Parser.Pattern.Prim.ParseMode
( ParseMode(..)
, ParseFixity(..)
, ExtParser
)
where
import Language.Egison.Syntax.Pattern.Fixity
( Fixity )
import Language.Egison.Parser.Pattern.Prim.Source
( Tokens )
type ExtParser s a = Tokens s -> Either String a
data ParseFixity n s =
ParseFixity { fixity :: Fixity n
, parser :: ExtParser s ()
}
data ParseMode n v e s
= ParseMode { fixities :: [ParseFixity n s]
, blockComment :: Maybe (Tokens s, Tokens s)
, lineComment :: Maybe (Tokens s)
, varNameParser :: ExtParser s v
, nameParser :: ExtParser s n
, valueExprParser :: ExtParser s e
}