[OCaml] Org mode parser.
refactor remove parse_with_diagnostics and Diagnostic from public API
parse_with_diagnostics was a no-op stub that always returned an empty list. Remove it entirely rather than shipping dead API surface. The Diagnostic module remains internally for future use but is no longer publicly exposed.
Changed files
README.org
@@ -106,7 +106,6 @@
106
106
The public API is minimal:
107
107
108
108
- =Org.parse : string -> Org.Ast.document=
109
Removed:
- =Org.parse_with_diagnostics : string -> Org.Ast.document * Org.Diagnostic.t list=
110
109
111
110
* Supported Syntax
112
111
lib/org.ml
@@ -14,23 +14,7 @@
14
14
15
15
module Ast = Ast
16
16
module Config = Config
17
Removed:
module Diagnostic : sig
18
Removed:
(** Severity levels for diagnostics. *)
19
Removed:
type severity = Diagnostic.severity =
20
Removed:
| Warning (** Recoverable issue, structure was inferred *)
21
Removed:
| Error (** Significant structural issue *)
22
17
23
Removed:
(** A single diagnostic. *)
24
Removed:
type t = Diagnostic.t = {
25
Removed:
severity : severity;
26
Removed:
line : int; (** 1-based line number, 0 if unknown *)
27
Removed:
message : string;
28
Removed:
}
29
Removed:
30
Removed:
(** Format a diagnostic as a human-readable string. *)
31
Removed:
val to_string : t -> string
32
Removed:
end = Diagnostic
33
Removed:
34
18
(** {1 Internal sub-modules}
35
19
36
20
These are exposed for testing and advanced use. They are not
@@ -69,15 +53,3 @@
69
53
in
70
54
let raw = Parse_bridge.parse ~config input in
71
55
Normalize.normalize config raw
72
Removed:
73
Removed:
(** Parse an Org Mode document with diagnostic reporting.
74
Removed:
75
Removed:
Returns both the best-effort AST and a list of diagnostics
76
Removed:
for recoverable issues encountered during parsing.
77
Removed:
78
Removed:
Note: diagnostic collection is not yet wired through the
79
Removed:
parsing pipeline. This currently always returns an empty
80
Removed:
diagnostic list. *)
81
Removed:
let parse_with_diagnostics ?config input =
82
Removed:
let doc = parse ?config input in
83
Removed:
(doc, [])