aboutsummaryrefslogtreecommitdiffstats
path: root/lib/prl/parser.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/prl/parser.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/prl/parser.ml b/lib/prl/parser.ml
index 2567eea..e009b97 100644
--- a/lib/prl/parser.ml
+++ b/lib/prl/parser.ml
@@ -1,12 +1,11 @@
module Error = struct
open Condition
+
let parse_error msg = condition "parse-error" msg empty
end
let of_sexp sexp =
- let sexp =
- match sexp with Sexplib.Sexp.List [ atom ] -> atom | other -> other
- in
+ let sexp = match sexp with Sexplib.Sexp.List [atom] -> atom | other -> other in
match Ast.statement_of_sexp sexp with
| stmt -> Ok stmt
| exception exn -> Error (Error.parse_error (Printexc.to_string exn))