diff --git a/src/Language.hs b/src/Language.hs index 3ac854757..f86897322 100644 --- a/src/Language.hs +++ b/src/Language.hs @@ -13,10 +13,11 @@ import Term data Language = C | Go + | JavaScript | Markdown - | Ruby - | TypeScript -- ^ Also JavaScript. | Python + | Ruby + | TypeScript deriving (Show, Eq, Read, Generic, ToJSON) -- | Returns a Language based on the file extension (including the "."). diff --git a/src/Parser.hs b/src/Parser.hs index 47edb2aab..367832161 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -53,6 +53,7 @@ parserForLanguage Nothing = LineByLineParser parserForLanguage (Just language) = case language of C -> TreeSitterParser C tree_sitter_c Go -> TreeSitterParser Go tree_sitter_go + JavaScript -> TreeSitterParser TypeScript tree_sitter_typescript Ruby -> TreeSitterParser Ruby tree_sitter_ruby TypeScript -> TreeSitterParser TypeScript tree_sitter_typescript _ -> LineByLineParser