core_ast: add of_sexpr
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
2026-01-14 12:28:22 +03:00
parent d41d8e5fbe
commit 11625c88c6

View File

@@ -79,3 +79,8 @@ and of_syntactic : Syntactic_ast.top_level -> top_level = function
| Def (Define (s, e)) -> Define (s, of_expr e) | Def (Define (s, e)) -> Define (s, of_expr e)
| Exp (e) -> Expr (of_expr e) | Exp (e) -> Expr (of_expr e)
| _ -> . | _ -> .
let of_sexpr x =
Result.bind (Syntactic_ast.make x)
(fun x -> Ok (of_syntactic x))