aboutsummaryrefslogblamecommitdiffstats
path: root/lib/vcl/sublanguage.ml
blob: 4319eb86d1b6b626478fdc96ddc25ea95fdb1eff (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                

                       
                                                                                                                             

     



                                  






                                                                            
                                               

                            
   
module Make (NT : Nt.S) = struct
  module Error = struct
    open Condition
    let unrecognized_command expr = condition "unrecognized-command" "Unrecognized command" ("expression" |=| (of_sexp expr))
  end

  module Exec = Executor.Make (NT)

  type configuration = unit
  type ast = Ast.statement

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

  let parse_sexp = function
    | Sexplib.Sexp.(List [ Atom "use"; Atom branch ]) -> Ok (Ast.Use branch)
    | sexp ->
        Error (Error.unrecognized_command sexp)

  let execute = Exec.execute
end