Skip to content

Commit

Permalink
put comment types inside Syntax module
Browse files Browse the repository at this point in the history
  • Loading branch information
rvantonder committed Sep 16, 2019
1 parent 9a6f7ef commit 49e1dfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 26 deletions.
20 changes: 0 additions & 20 deletions lib/matchers/languages.ml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ module Latex = struct
end
module Syntax = struct
open Types
include Dyck.Syntax
let user_defined_delimiters =
Expand All @@ -97,7 +96,6 @@ module Assembly = struct
end
module Syntax = struct
open Types
include Dyck.Syntax
let comments =
Expand All @@ -115,7 +113,6 @@ module Clojure = struct
end
module Syntax = struct
open Types
include Dyck.Syntax
let escapable_string_literals = ordinary_string
Expand All @@ -136,7 +133,6 @@ module Lisp = struct
module Syntax = struct
include Clojure.Syntax
open Types
let comments =
Clojure.Syntax.comments @
Expand Down Expand Up @@ -174,7 +170,6 @@ module Bash = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let user_defined_delimiters =
Expand All @@ -200,7 +195,6 @@ module Ruby = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let user_defined_delimiters =
Expand Down Expand Up @@ -239,7 +233,6 @@ module Elixir = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let user_defined_delimiters =
Expand Down Expand Up @@ -268,7 +261,6 @@ module Python = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let raw_string_literals =
Expand All @@ -291,7 +283,6 @@ module Html = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let user_defined_delimiters =
Expand Down Expand Up @@ -323,7 +314,6 @@ module SQL = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let comments =
Expand All @@ -342,7 +332,6 @@ module Erlang = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let user_defined_delimiters =
Expand Down Expand Up @@ -374,7 +363,6 @@ module C = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let comments =
Expand Down Expand Up @@ -457,7 +445,6 @@ module Php = struct

module Syntax = struct
include C.Syntax
open Types

let comments =
C.Syntax.comments @
Expand Down Expand Up @@ -501,7 +488,6 @@ module Swift = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let comments =
Expand Down Expand Up @@ -541,7 +527,6 @@ module OCaml = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let user_defined_delimiters =
Expand Down Expand Up @@ -586,7 +571,6 @@ module Pascal = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let comments =
Expand All @@ -606,7 +590,6 @@ module Julia = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let comments =
Expand Down Expand Up @@ -634,7 +617,6 @@ module Fortran = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let comments =
Expand All @@ -652,7 +634,6 @@ module Haskell = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let raw_string_literals =
Expand Down Expand Up @@ -685,7 +666,6 @@ module C_nested_comments = struct
end

module Syntax = struct
open Types
include Generic.Syntax

let comments =
Expand Down
12 changes: 6 additions & 6 deletions lib/matchers/types.ml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
open Core

type comment_kind =
| Multiline of string * string
| Nested_multiline of string * string
| Until_newline of string
[@@deriving yojson]

module Syntax = struct

type escapable_string_literals =
Expand All @@ -14,6 +8,12 @@ module Syntax = struct
}
[@@deriving yojson]

type comment_kind =
| Multiline of string * string
| Nested_multiline of string * string
| Until_newline of string
[@@deriving yojson]

type t = {
user_defined_delimiters : (string * string) list;
escapable_string_literals : escapable_string_literals option; [@default None]
Expand Down

0 comments on commit 49e1dfd

Please sign in to comment.