mirror of
https://github.com/comby-tools/comby.git
synced 2024-08-16 16:50:37 +03:00
update languages (add matlab, R, fix .tf)
This commit is contained in:
parent
9b2edf01c3
commit
ef89413fb4
@ -618,6 +618,7 @@ module Matchers : sig
|
||||
module Kotlin : Language.S
|
||||
module Scala : Language.S
|
||||
module Nim : Language.S
|
||||
module Matlab : Language.S
|
||||
module Dart : Language.S
|
||||
module Php : Language.S
|
||||
module Go : Language.S
|
||||
@ -627,6 +628,7 @@ module Matchers : sig
|
||||
module Tsx : Language.S
|
||||
module Swift : Language.S
|
||||
module Rust : Language.S
|
||||
module R : Language.S
|
||||
module OCaml : Language.S
|
||||
module Reason : Language.S
|
||||
module Fsharp : Language.S
|
||||
@ -679,6 +681,7 @@ module Matchers : sig
|
||||
module Kotlin : Matcher.S
|
||||
module Scala : Matcher.S
|
||||
module Nim : Matcher.S
|
||||
module Matlab : Matcher.S
|
||||
module Dart : Matcher.S
|
||||
module Php : Matcher.S
|
||||
module Go : Matcher.S
|
||||
@ -688,6 +691,7 @@ module Matchers : sig
|
||||
module Tsx : Matcher.S
|
||||
module Swift : Matcher.S
|
||||
module Rust : Matcher.S
|
||||
module R : Matcher.S
|
||||
module OCaml : Matcher.S
|
||||
module Reason : Matcher.S
|
||||
module Fsharp : Matcher.S
|
||||
|
@ -60,6 +60,7 @@ module Make (Make : Types.Language.S -> Types.Metasyntax.S -> Types.Matcher.S) :
|
||||
module Kotlin = Make (Kotlin) (Metasyntax.Default)
|
||||
module Scala = Make (Scala) (Metasyntax.Default)
|
||||
module Nim = Make (Nim) (Metasyntax.Default)
|
||||
module Matlab = Make (Matlab) (Metasyntax.Default)
|
||||
module Dart = Make (Dart) (Metasyntax.Default)
|
||||
module Php = Make (Php) (Metasyntax.Default)
|
||||
module Go = Make (Go) (Metasyntax.Default)
|
||||
@ -69,6 +70,7 @@ module Make (Make : Types.Language.S -> Types.Metasyntax.S -> Types.Matcher.S) :
|
||||
module Tsx = Make (Tsx) (Metasyntax.Default)
|
||||
module Swift = Make (Swift) (Metasyntax.Default)
|
||||
module Rust = Make (Rust) (Metasyntax.Default)
|
||||
module R = Make (R) (Metasyntax.Default)
|
||||
module OCaml = Make (OCaml) (Metasyntax.Default)
|
||||
module Reason = Make (Reason) (Metasyntax.Default)
|
||||
module Fsharp = Make (Fsharp) (Metasyntax.Default)
|
||||
@ -116,12 +118,14 @@ module Make (Make : Types.Language.S -> Types.Metasyntax.S -> Types.Matcher.S) :
|
||||
; (module Lisp)
|
||||
; (module Move)
|
||||
; (module Nim)
|
||||
; (module Matlab)
|
||||
; (module OCaml)
|
||||
; (module Paren)
|
||||
; (module Pascal)
|
||||
; (module Php)
|
||||
; (module Python)
|
||||
; (module Reason)
|
||||
; (module R)
|
||||
; (module Ruby)
|
||||
; (module Rust)
|
||||
; (module Scala)
|
||||
|
@ -499,8 +499,8 @@ end
|
||||
|
||||
module HCL = struct
|
||||
module Info = struct
|
||||
let name = "HashiCorp Configuration Language"
|
||||
let extensions = [".hcl"]
|
||||
let name = "Terraform (HashiCorp Configuration Language"
|
||||
let extensions = [".tf"; ".hcl"]
|
||||
end
|
||||
|
||||
module Syntax = struct
|
||||
@ -789,6 +789,49 @@ module Julia = struct
|
||||
end
|
||||
end
|
||||
|
||||
module Matlab = struct
|
||||
module Info = struct
|
||||
let name = "MATLAB"
|
||||
let extensions = [".m"]
|
||||
end
|
||||
|
||||
module Syntax = struct
|
||||
include Generic.Syntax
|
||||
|
||||
let user_defined_delimiters =
|
||||
Generic.Syntax.user_defined_delimiters
|
||||
@
|
||||
[ "if", "end"
|
||||
; "for", "end"
|
||||
; "parfor", "end"
|
||||
; "while", "end"
|
||||
; "try", "end"
|
||||
; "switch", "end"
|
||||
; "function", "end"
|
||||
]
|
||||
|
||||
let comments =
|
||||
[ Multiline ("%{", "}%")
|
||||
; Until_newline "%"
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
module R = struct
|
||||
module Info = struct
|
||||
let name = "R"
|
||||
let extensions = [".r"]
|
||||
end
|
||||
|
||||
module Syntax = struct
|
||||
include Generic.Syntax
|
||||
|
||||
let comments =
|
||||
[ Until_newline "#"
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
module Fortran = struct
|
||||
module Info = struct
|
||||
let name = "Fortran"
|
||||
@ -911,6 +954,7 @@ let all: (module Types.Language.S) list =
|
||||
; (module Kotlin)
|
||||
; (module Latex)
|
||||
; (module Lisp)
|
||||
; (module Matlab)
|
||||
; (module Move)
|
||||
; (module Nim)
|
||||
; (module OCaml)
|
||||
@ -918,6 +962,7 @@ let all: (module Types.Language.S) list =
|
||||
; (module Pascal)
|
||||
; (module Php)
|
||||
; (module Python)
|
||||
; (module R)
|
||||
; (module Reason)
|
||||
; (module Ruby)
|
||||
; (module Rust)
|
||||
|
@ -27,6 +27,7 @@ module CSS : Language.S
|
||||
module Kotlin : Language.S
|
||||
module Scala : Language.S
|
||||
module Nim : Language.S
|
||||
module Matlab : Language.S
|
||||
module Dart : Language.S
|
||||
module Php : Language.S
|
||||
module Go : Language.S
|
||||
@ -36,6 +37,7 @@ module Typescript : Language.S
|
||||
module Tsx : Language.S
|
||||
module Swift : Language.S
|
||||
module Rust : Language.S
|
||||
module R : Language.S
|
||||
module OCaml : Language.S
|
||||
module Reason : Language.S
|
||||
module Fsharp : Language.S
|
||||
|
@ -245,6 +245,7 @@ module Engine = struct
|
||||
module Kotlin : Matcher.S
|
||||
module Scala : Matcher.S
|
||||
module Nim : Matcher.S
|
||||
module Matlab : Matcher.S
|
||||
module Dart : Matcher.S
|
||||
module Php : Matcher.S
|
||||
module Go : Matcher.S
|
||||
@ -254,6 +255,7 @@ module Engine = struct
|
||||
module Tsx : Matcher.S
|
||||
module Swift : Matcher.S
|
||||
module Rust : Matcher.S
|
||||
module R : Matcher.S
|
||||
module OCaml : Matcher.S
|
||||
module Reason : Matcher.S
|
||||
module Fsharp : Matcher.S
|
||||
|
@ -23,7 +23,7 @@ let%expect_test "list_languages" =
|
||||
-matcher .go Go
|
||||
-matcher .html HTML
|
||||
-matcher .hs Haskell
|
||||
-matcher .hcl HashiCorp Configuration Language
|
||||
-matcher .tf Terraform (HashiCorp Configuration Language
|
||||
-matcher .java Java
|
||||
-matcher .js JavaScript
|
||||
-matcher .jsx JSX
|
||||
@ -37,12 +37,14 @@ let%expect_test "list_languages" =
|
||||
-matcher .lisp Lisp
|
||||
-matcher .move Move
|
||||
-matcher .nim Nim
|
||||
-matcher .m MATLAB
|
||||
-matcher .ml OCaml
|
||||
-matcher .paren Paren
|
||||
-matcher .pas Pascal
|
||||
-matcher .php PHP
|
||||
-matcher .py Python
|
||||
-matcher .re Reason
|
||||
-matcher .r R
|
||||
-matcher .rb Ruby
|
||||
-matcher .rs Rust
|
||||
-matcher .scala Scala
|
||||
|
Loading…
Reference in New Issue
Block a user