module Math.REPL.Parser.Statement (parseStat) where

--------------------------------------------------------------------------------

import           Math.REPL.Parser.Cmd         (parseCmd)
import           Math.REPL.Parser.Expr        (parseExpr)
import           Math.REPL.Prim.Statement     (Statement (..))

--------------------------------------------------------------------------------

import           Control.Applicative           ((<$>))
import           Text.ParserCombinators.Parsec

--------------------------------------------------------------------------------

parseStat :: Parser Statement
parseStat = (Expression <$> parseExpr) <|> (Command <$> parseCmd)

--------------------------------------------------------------------------------
