mirror of
https://github.com/github/semantic.git
synced 2024-12-27 08:54:14 +03:00
JavaScript as a distinct language, but uses TypeScript parser
This commit is contained in:
parent
2147fbe7d8
commit
d5793fc78d
@ -13,10 +13,11 @@ import Term
|
|||||||
data Language =
|
data Language =
|
||||||
C
|
C
|
||||||
| Go
|
| Go
|
||||||
|
| JavaScript
|
||||||
| Markdown
|
| Markdown
|
||||||
| Ruby
|
|
||||||
| TypeScript -- ^ Also JavaScript.
|
|
||||||
| Python
|
| Python
|
||||||
|
| Ruby
|
||||||
|
| TypeScript
|
||||||
deriving (Show, Eq, Read, Generic, ToJSON)
|
deriving (Show, Eq, Read, Generic, ToJSON)
|
||||||
|
|
||||||
-- | Returns a Language based on the file extension (including the ".").
|
-- | Returns a Language based on the file extension (including the ".").
|
||||||
|
@ -53,6 +53,7 @@ parserForLanguage Nothing = LineByLineParser
|
|||||||
parserForLanguage (Just language) = case language of
|
parserForLanguage (Just language) = case language of
|
||||||
C -> TreeSitterParser C tree_sitter_c
|
C -> TreeSitterParser C tree_sitter_c
|
||||||
Go -> TreeSitterParser Go tree_sitter_go
|
Go -> TreeSitterParser Go tree_sitter_go
|
||||||
|
JavaScript -> TreeSitterParser TypeScript tree_sitter_typescript
|
||||||
Ruby -> TreeSitterParser Ruby tree_sitter_ruby
|
Ruby -> TreeSitterParser Ruby tree_sitter_ruby
|
||||||
TypeScript -> TreeSitterParser TypeScript tree_sitter_typescript
|
TypeScript -> TreeSitterParser TypeScript tree_sitter_typescript
|
||||||
_ -> LineByLineParser
|
_ -> LineByLineParser
|
||||||
|
Loading…
Reference in New Issue
Block a user