mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
Refactor GFI to treat command line files and the i command uniformly. Disable CSE by default in GFI.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module GF.Command.Interpreter (
|
||||
CommandEnv (..),
|
||||
mkCommandEnv,
|
||||
interpretCommandLine
|
||||
) where
|
||||
|
||||
@@ -21,6 +22,9 @@ data CommandEnv = CommandEnv {
|
||||
commands :: Map.Map String CommandInfo
|
||||
}
|
||||
|
||||
mkCommandEnv :: PGF -> CommandEnv
|
||||
mkCommandEnv pgf = CommandEnv pgf (allCommands pgf)
|
||||
|
||||
interpretCommandLine :: CommandEnv -> String -> IO ()
|
||||
interpretCommandLine env line = case (pCommandLine (myLexer line)) of
|
||||
Ok CEmpty -> return ()
|
||||
|
||||
Reference in New Issue
Block a user