-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,037 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
module Language = Language | ||
module Matchers = Matchers | ||
module Match = Match | ||
module Replacement = Replacement | ||
module Rewriter = Rewriter | ||
module Statistics = Statistics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
module Language = Language | ||
module Matchers = Matchers | ||
module Match = Match | ||
module Replacement = Replacement | ||
module Rewriter = Rewriter | ||
module Statistics = Statistics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
mparser | ||
mparser.pcre | ||
comby.matchers | ||
comby.replacement | ||
comby.rewriter | ||
comby.match | ||
comby.language | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
include Languages | ||
|
||
module Configuration = Configuration | ||
|
||
module type Matcher = Types.Matcher.S | ||
|
||
include Languages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
include module type of Languages | ||
|
||
module Configuration = Configuration | ||
|
||
module type Matcher = Types.Matcher.S | ||
|
||
include module type of Languages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(library | ||
(name replacement) | ||
(public_name comby.replacement) | ||
(preprocess (pps ppx_deriving.show ppx_deriving.eq ppx_sexp_conv ppx_sexp_message ppx_deriving_yojson bisect_ppx -conditional -no-comment-parsing)) | ||
(libraries comby.parsers comby.match ppxlib core mparser mparser.pcre yojson ppx_deriving_yojson ppx_deriving_yojson.runtime)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
open Match | ||
|
||
type t = | ||
{ range : range | ||
; replacement_content : string | ||
; environment : environment | ||
} | ||
[@@deriving yojson] | ||
|
||
type result = | ||
{ rewritten_source : string | ||
; in_place_substitutions : t list | ||
} | ||
[@@deriving yojson] | ||
|
||
let empty_result = | ||
{ rewritten_source = "" | ||
; in_place_substitutions = [] | ||
} | ||
[@@deriving yojson] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
open Match | ||
|
||
type t = | ||
{ range : range | ||
; replacement_content : string | ||
; environment : environment | ||
} | ||
[@@deriving yojson] | ||
|
||
type result = | ||
{ rewritten_source : string | ||
; in_place_substitutions : t list | ||
} | ||
[@@deriving yojson] | ||
|
||
val empty_result : result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
open Match | ||
|
||
type match_context_replacement = | ||
{ range : range | ||
; replacement_content : string | ||
; environment : environment | ||
} | ||
[@@deriving yojson] | ||
|
||
type result = | ||
{ rewritten_source : string | ||
; in_place_substitutions : match_context_replacement list | ||
} | ||
[@@deriving yojson] | ||
|
||
(** if [source] is given, substitute in-place. If not, | ||
emit result separated by newlines *) | ||
val all | ||
: ?source:string | ||
-> rewrite_template:string | ||
-> Match.t list | ||
-> result option | ||
-> Replacement.result option |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Rewrite = Rewrite | ||
module Rewrite_template = Rewrite_template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Rewrite = Rewrite | ||
module Rewrite_template = Rewrite_template |
Oops, something went wrong.