forked from logseq/mldoc
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
8e26c9e
commit c44f059
Showing
50 changed files
with
4,921 additions
and
3,806 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,24 +1,44 @@ | ||
open Mldoc.Parser | ||
open Mldoc.Conf | ||
|
||
open Core | ||
open Core_bench | ||
|
||
let doc_org = load_file "./examples/doc.org" | ||
|
||
let syntax_org = load_file "./examples/syntax.org" | ||
|
||
let syntax_md = load_file "./examples/syntax.md" | ||
|
||
let main () = | ||
Command.run (Bench.make_command [ | ||
Bench.Test.create ~name:"Mldoc Org mode parser (doc)" (fun () -> | ||
let config = {toc = true; heading_number = true; keep_line_break = false; format = Org; } in | ||
ignore (parse config doc_org)); | ||
Bench.Test.create ~name:"Mldoc Org mode parser (syntax)" (fun () -> | ||
let config = {toc = true; heading_number = true; keep_line_break = false; format = Org; } in | ||
ignore (parse config syntax_org)); | ||
Bench.Test.create ~name:"Mldoc Markdown parser" (fun () -> | ||
let config = {toc = true; heading_number = true; keep_line_break = false; format = Markdown; } in | ||
ignore (parse config syntax_md)); | ||
]) | ||
Command.run | ||
(Bench.make_command | ||
[ Bench.Test.create ~name:"Mldoc Org mode parser (doc)" (fun () -> | ||
let config = | ||
{ toc = true | ||
; heading_number = true | ||
; keep_line_break = false | ||
; format = Org | ||
} | ||
in | ||
ignore (parse config doc_org)) | ||
; Bench.Test.create ~name:"Mldoc Org mode parser (syntax)" (fun () -> | ||
let config = | ||
{ toc = true | ||
; heading_number = true | ||
; keep_line_break = false | ||
; format = Org | ||
} | ||
in | ||
ignore (parse config syntax_org)) | ||
; Bench.Test.create ~name:"Mldoc Markdown parser" (fun () -> | ||
let config = | ||
{ toc = true | ||
; heading_number = true | ||
; keep_line_break = false | ||
; format = Markdown | ||
} | ||
in | ||
ignore (parse config syntax_md)) | ||
]) | ||
|
||
let () = main () |
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,7 +1,7 @@ | ||
(executable | ||
(name bench) | ||
(name bench) | ||
(libraries angstrom mldoc core core_bench)) | ||
|
||
(alias | ||
(name bench) | ||
(deps bench.exe)) | ||
(name bench) | ||
(deps bench.exe)) |
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,5 @@ | ||
(executable | ||
(name main) | ||
(name main) | ||
(public_name mldoc) | ||
(libraries angstrom mldoc cmdliner lwt.unix)) | ||
|
||
|
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,9 +1,10 @@ | ||
(executable | ||
(name lib) | ||
(name lib) | ||
(modes js) | ||
(preprocess (pps js_of_ocaml-ppx)) | ||
(preprocess | ||
(pps js_of_ocaml-ppx)) | ||
(libraries angstrom js_of_ocaml mldoc)) | ||
|
||
(alias | ||
(name JS) | ||
(deps lib.bc.js)) | ||
(name JS) | ||
(deps lib.bc.js)) |
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
Oops, something went wrong.