Simplify versioning matching
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
a4bc260241
commit
8390af90e4
|
@ -63,15 +63,13 @@ let load fname =
|
||||||
| _ ->
|
| _ ->
|
||||||
Loc.fail (Sexp.Loc.of_lexbuf lexbuf) "%s" bad_dune_file
|
Loc.fail (Sexp.Loc.of_lexbuf lexbuf) "%s" bad_dune_file
|
||||||
in
|
in
|
||||||
match version with
|
let lexer =
|
||||||
| "1" ->
|
match version with
|
||||||
Sexp.Of_sexp.parse of_sexp Univ_map.empty
|
| "1" -> Sexp.Lexer.jbuild_token
|
||||||
(Io.Sexp.load ~lexer:Sexp.Lexer.jbuild_token ~mode:Single fname)
|
| "2" -> Sexp.Lexer.token
|
||||||
| "2" ->
|
| _ -> Loc.fail version_loc "unknown version %S" version
|
||||||
Sexp.Of_sexp.parse of_sexp Univ_map.empty
|
in
|
||||||
(Io.Sexp.load ~lexer:Sexp.Lexer.token ~mode:Single fname)
|
Sexp.Of_sexp.parse of_sexp Univ_map.empty lexer ~mode:Single fname
|
||||||
| _ ->
|
|
||||||
Loc.fail version_loc "unknown version %S" version)
|
|
||||||
|
|
||||||
let gen confs =
|
let gen confs =
|
||||||
let sexps =
|
let sexps =
|
||||||
|
|
Loading…
Reference in New Issue