[OCaml] Org mode parser.
refactor move internal modules behind Org.Private namespace
Lexer, Parse_bridge, and Raw_ast are no longer directly on the Org module. They are now accessible as Org.Private.Lexer etc. The (**/**) markers hide them from odoc documentation. This keeps the public API clean while still allowing tests and advanced users to access internals explicitly.
Changed files
lib/org.ml
@@ -22,9 +22,13 @@
22
22
These are exposed for testing and advanced use. They are not
23
23
part of the stable public API and may change without notice. *)
24
24
25
Removed:
module Lexer = Lexer
26
Removed:
module Parse_bridge = Parse_bridge
27
Removed:
module Raw_ast = Raw_ast
25
Added:
(**/**)
26
Added:
module Private = struct
27
Added:
module Lexer = Lexer
28
Added:
module Parse_bridge = Parse_bridge
29
Added:
module Raw_ast = Raw_ast
30
Added:
end
31
Added:
(**/**)
28
32
29
33
(** {1 Parsing entry points} *)
30
34
test/test_main.ml
@@ -52,7 +52,7 @@
52
52
Alcotest.(check (list string)) "no done" [] seq.done_
53
53
54
54
(* Lexer tests *)
55
Removed:
module L = Org.Lexer
55
Added:
module L = Org.Private.Lexer
56
56
57
57
let config = Org.Config.default
58
58
@@ -159,8 +159,8 @@
159
159
check_tok "property" "Property(\"CUSTOM_ID\", \"my-id\")" (List.nth toks 0)
160
160
161
161
(* Parser tests *)
162
Removed:
module P = Org.Parse_bridge
163
Removed:
module R = Org.Raw_ast
162
Added:
module P = Org.Private.Parse_bridge
163
Added:
module R = Org.Private.Raw_ast
164
164
module A = Org.Ast
165
165
166
166
let parse input = P.parse ~config input