mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Rename the language mode types.
This commit is contained in:
parent
d773ca8282
commit
58c5eac144
@ -10,8 +10,8 @@ module Data.Language
|
||||
, codeNavLanguages
|
||||
, textToLanguage
|
||||
, languageToText
|
||||
, LanguageModes(..)
|
||||
, ASTMode(..)
|
||||
, PerLanguageModes(..)
|
||||
, LanguageMode(..)
|
||||
) where
|
||||
|
||||
import Data.Aeson
|
||||
@ -141,12 +141,12 @@ textToLanguage = \case
|
||||
_ -> Unknown
|
||||
|
||||
|
||||
newtype LanguageModes = LanguageModes
|
||||
{ pythonMode :: ASTMode
|
||||
newtype PerLanguageModes = PerLanguageModes
|
||||
{ pythonMode :: LanguageMode
|
||||
}
|
||||
deriving (Eq, Ord, Show)
|
||||
|
||||
data ASTMode
|
||||
data LanguageMode
|
||||
= ALaCarte
|
||||
| Precise
|
||||
deriving (Bounded, Enum, Eq, Ord, Read, Show)
|
||||
|
@ -102,7 +102,7 @@ parseCommand :: Mod CommandFields (Task.TaskEff Builder)
|
||||
parseCommand = command "parse" (info parseArgumentsParser (progDesc "Generate parse trees for path(s)"))
|
||||
where
|
||||
parseArgumentsParser = do
|
||||
language <- Language.LanguageModes
|
||||
language <- Language.PerLanguageModes
|
||||
<$> option auto ( long "python-mode"
|
||||
<> help "The AST representation to use for Python sources"
|
||||
<> metavar "ALaCarte|Precise"
|
||||
|
Loading…
Reference in New Issue
Block a user