diff options
| author | bjorn <bjorn@bringert.net> | 2008-05-30 15:20:28 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-05-30 15:20:28 +0000 |
| commit | 2f89962c442ba6c9d82d19e8e184a136c1f58bc9 (patch) | |
| tree | d09a91103775276a2e98cbf09036d5552e279a96 /src-3.0/GF/Command | |
| parent | 54ebdab1f730ef7b0d5de9faefbfaac6b7f3bd4b (diff) | |
Refactor GFI to treat command line files and the i command uniformly. Disable CSE by default in GFI.
Diffstat (limited to 'src-3.0/GF/Command')
| -rw-r--r-- | src-3.0/GF/Command/Importing.hs | 1 | ||||
| -rw-r--r-- | src-3.0/GF/Command/Interpreter.hs | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src-3.0/GF/Command/Importing.hs b/src-3.0/GF/Command/Importing.hs index 48f07969d..c3ad9d746 100644 --- a/src-3.0/GF/Command/Importing.hs +++ b/src-3.0/GF/Command/Importing.hs @@ -14,6 +14,7 @@ import System.FilePath -- import a grammar in an environment where it extends an existing grammar importGrammar :: PGF -> Options -> [FilePath] -> IO PGF +importGrammar pgf0 _ [] = return pgf0 importGrammar pgf0 opts files = case takeExtensions (last files) of s | elem s [".gf",".gfo"] -> do diff --git a/src-3.0/GF/Command/Interpreter.hs b/src-3.0/GF/Command/Interpreter.hs index a5da51f7e..fa0de5ec8 100644 --- a/src-3.0/GF/Command/Interpreter.hs +++ b/src-3.0/GF/Command/Interpreter.hs @@ -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 () |
