Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc: upgrade sedlex #1725

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading