aboutsummaryrefslogtreecommitdiffstats
path: root/lib/drl/sublanguage.ml
blob: ccc02226616aa83639250c23b33774119e05b5a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Make (NT : Nt.S) = struct
  module Exec = Executor.Make (NT)

  type configuration = unit
  type ast = Ast.query
  type error = Exec.error

  let name = "drl"
  let parse _ = Ok ()

  let parse_sexp sexp =
    match Parser.of_sexp sexp with
    | Ok r -> Ok r
    | Error (Parser.ParseError s) -> Error (Exec.ParseError s)

  let execute ctx ast = Exec.execute ctx ast

  let sexp_of_error = Exec.sexp_of_error
end