From e10acd09faf53c636b653c4df034716545db5fab Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 8 Mar 2026 20:36:31 -0300 Subject: dml and dcl --- lib/dml/parser.ml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/dml/parser.ml (limited to 'lib/dml/parser.ml') diff --git a/lib/dml/parser.ml b/lib/dml/parser.ml new file mode 100644 index 0000000..a7981c0 --- /dev/null +++ b/lib/dml/parser.ml @@ -0,0 +1,9 @@ +type error = ParseError of string + +let of_string s = + match Sexplib.Sexp.of_string s |> Ast.statement_of_sexp with + | stmt -> Ok stmt + | exception exn -> Error (ParseError (Printexc.to_string exn)) + +let to_string stmt = + Ast.sexp_of_statement stmt |> Sexplib.Sexp.to_string_hum -- cgit v1.2.3