-- Copyright (c) 2007-2023, Chris Pressey, Cat's Eye Technologies.
-- This file is distributed under a 2-clause BSD license, see LICENSES/ dir.
-- SPDX-License-Identifier: LicenseRef-BSD-2-Clause-X-Burro
module Main where
import System.Environment
import Language.Burro.Definition
import qualified Language.Burro.Debugger as Debugger
main = do
args <- getArgs
case args of
["run", fileName] -> do
c <- readFile fileName
burroText <- readFile fileName
putStrLn $ show $ interpret burroText
["debug", fileName] -> do
c <- readFile fileName
burroText <- readFile fileName
state <- Debugger.interpret burroText
putStrLn $ show $ state
_ -> do
putStrLn "Usage: burro (run|debug) <filename.burro>"