Skip to content

Commit

Permalink
Misc: upgrade sedlex
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Nov 1, 2024
1 parent 450ddbb commit 4e12aea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compiler/lib/flow_lexer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,9 @@ let backquote env lexbuf =

let wrap f =
let f env =
let start, _ = Sedlexing.lexing_positions env.Lex_env.lex_lb in
let start = Sedlexing.lexing_position_start env.Lex_env.lex_lb in
let t = f env env.Lex_env.lex_lb in
let _, stop = Sedlexing.lexing_positions env.Lex_env.lex_lb in
let stop = Sedlexing.lexing_position_curr env.Lex_env.lex_lb in
t, Loc.create ~last_line:(Loc.line_end' !(env.lex_last_loc)) start stop
in
let rec helper comments env =
Expand Down
2 changes: 1 addition & 1 deletion compiler/lib/parse_js.ml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ end = struct
Option.iter filename ~f:(Sedlexing.set_filename l);
create ?report_error l

let curr_pos lexbuf = snd (Sedlexing.lexing_positions lexbuf.l)
let curr_pos lexbuf = Sedlexing.lexing_position_curr lexbuf.l

let report_errors t res =
match Flow_lexer.Lex_result.errors res with
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
(ppxlib (>= 0.15.0))
(re :with-test)
(cmdliner (>= 1.1.0))
(sedlex (>= 2.3))
(sedlex (>= 3.3))
(qcheck :with-test)
menhir
menhirLib
Expand Down
2 changes: 1 addition & 1 deletion js_of_ocaml-compiler.opam
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ depends: [
"ppxlib" {>= "0.15.0"}
"re" {with-test}
"cmdliner" {>= "1.1.0"}
"sedlex" {>= "2.3"}
"sedlex" {>= "3.3"}
"qcheck" {with-test}
"menhir"
"menhirLib"
Expand Down

0 comments on commit 4e12aea

Please sign in to comment.