mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-02 15:52:50 -06:00
the new design for -tags
This commit is contained in:
@@ -74,7 +74,7 @@ errors = fail . unlines
|
||||
-- Types
|
||||
|
||||
data Mode = ModeVersion | ModeHelp | ModeInteractive | ModeRun | ModeCompiler
|
||||
| ModeServer | ModeTags
|
||||
| ModeServer
|
||||
deriving (Show,Eq,Ord)
|
||||
|
||||
data Verbosity = Quiet | Normal | Verbose | Debug
|
||||
@@ -167,7 +167,8 @@ data Flags = Flags {
|
||||
optLexer :: Maybe String,
|
||||
optUnlexer :: Maybe String,
|
||||
optWarnings :: [Warning],
|
||||
optDump :: [Dump]
|
||||
optDump :: [Dump],
|
||||
optTagsOnly :: Bool
|
||||
}
|
||||
deriving (Show)
|
||||
|
||||
@@ -269,7 +270,8 @@ defaultFlags = Flags {
|
||||
optLexer = Nothing,
|
||||
optUnlexer = Nothing,
|
||||
optWarnings = [],
|
||||
optDump = []
|
||||
optDump = [],
|
||||
optTagsOnly = False
|
||||
}
|
||||
|
||||
-- Option descriptions
|
||||
@@ -285,7 +287,7 @@ optDescr =
|
||||
Option [] ["interactive"] (NoArg (mode ModeInteractive)) "Run in interactive mode (default).",
|
||||
Option [] ["run"] (NoArg (mode ModeRun)) "Run in interactive mode, showing output only (no other messages).",
|
||||
Option [] ["server"] (NoArg (mode ModeServer)) "Run in HTTP server mode.",
|
||||
Option [] ["tags"] (NoArg (mode ModeTags)) "Build TAGS file and exit.",
|
||||
Option [] ["tags"] (NoArg (set $ \o -> o{optMode = ModeCompiler, optTagsOnly = True})) "Build TAGS file and exit.",
|
||||
Option ['E'] [] (NoArg (phase Preproc)) "Stop after preprocessing (with --preproc).",
|
||||
Option ['C'] [] (NoArg (phase Convert)) "Stop after conversion to .gf.",
|
||||
Option ['c'] [] (NoArg (phase Compile)) "Stop after compiling to .gfo (default) .",
|
||||
|
||||
Reference in New Issue
Block a user