mirror of
https://github.com/comby-tools/comby.git
synced 2024-09-11 13:25:36 +03:00
Separate Javascript and Typescript and handle .tsx and .jsx (#130)
This commit is contained in:
parent
4099e561c1
commit
40cac158b6
@ -504,8 +504,17 @@ end
|
||||
|
||||
module Javascript = struct
|
||||
module Info = struct
|
||||
let name = "Javascript/Typescript"
|
||||
let extensions = [".js"; ".ts"]
|
||||
let name = "Javascript"
|
||||
let extensions = [".js"; ".jsx"]
|
||||
end
|
||||
|
||||
include Matcher.Make (Go.Syntax) (Info)
|
||||
end
|
||||
|
||||
module Typescript = struct
|
||||
module Info = struct
|
||||
let name = "Typescript"
|
||||
let extensions = [".ts"; ".tsx"]
|
||||
end
|
||||
|
||||
include Matcher.Make (Go.Syntax) (Info)
|
||||
@ -768,6 +777,7 @@ let all : (module Types.Matcher.S) list =
|
||||
; (module SQL)
|
||||
; (module Swift)
|
||||
; (module Text)
|
||||
; (module Typescript)
|
||||
; (module Xml)
|
||||
; (module Generic)
|
||||
]
|
||||
|
@ -300,7 +300,7 @@ let%expect_test "list_languages" =
|
||||
-matcher .html HTML
|
||||
-matcher .hs Haskell
|
||||
-matcher .java Java
|
||||
-matcher .js Javascript/Typescript
|
||||
-matcher .js Javascript
|
||||
-matcher .json JSON
|
||||
-matcher .jl Julia
|
||||
-matcher .kt Kotlin
|
||||
@ -319,6 +319,7 @@ let%expect_test "list_languages" =
|
||||
-matcher .sql SQL
|
||||
-matcher .swift Swift
|
||||
-matcher .txt Text
|
||||
-matcher .ts Typescript
|
||||
-matcher .xml XML
|
||||
-matcher .generic Generic
|
||||
|}]
|
||||
|
Loading…
Reference in New Issue
Block a user