Share loc variable
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
bedad1f689
commit
7b12e12571
|
@ -57,11 +57,10 @@ let load fname =
|
||||||
| t -> loop (t :: acc)
|
| t -> loop (t :: acc)
|
||||||
end
|
end
|
||||||
in
|
in
|
||||||
|
let loc = Sexp.Loc.of_lexbuf lexbuf in
|
||||||
match loop [] with
|
match loop [] with
|
||||||
| [Lparen; Atom (A "dune"); Atom s] ->
|
| [Lparen; Atom (A "dune"); Atom s] -> (loc, Sexp.Atom.to_string s)
|
||||||
(Sexp.Loc.of_lexbuf lexbuf, Sexp.Atom.to_string s)
|
| _ -> Loc.fail loc "%s" bad_dune_file
|
||||||
| _ ->
|
|
||||||
Loc.fail (Sexp.Loc.of_lexbuf lexbuf) "%s" bad_dune_file
|
|
||||||
in
|
in
|
||||||
let (lexer, syntax) =
|
let (lexer, syntax) =
|
||||||
match version with
|
match version with
|
||||||
|
|
Loading…
Reference in New Issue