mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
add Java data constructor to language type constructor
This commit is contained in:
parent
a0d880f1fa
commit
4280b9a300
@ -7,6 +7,7 @@ import Data.Aeson
|
||||
-- | A programming language.
|
||||
data Language
|
||||
= Go
|
||||
| Java
|
||||
| JavaScript
|
||||
| JSON
|
||||
| JSX
|
||||
@ -20,6 +21,7 @@ data Language
|
||||
-- | Returns a Language based on the file extension (including the ".").
|
||||
languageForType :: String -> Maybe Language
|
||||
languageForType mediaType = case mediaType of
|
||||
".java" -> Just Java
|
||||
".json" -> Just JSON
|
||||
".md" -> Just Markdown
|
||||
".rb" -> Just Ruby
|
||||
|
Loading…
Reference in New Issue
Block a user