From 4d2ffb388f6bc4324077b48af0e605671bf9d920 Mon Sep 17 00:00:00 2001 From: favonia Date: Tue, 26 Sep 2023 20:16:57 -0500 Subject: [PATCH] fix(parser): embrace the latest asai --- src/parser/Locate.ml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/parser/Locate.ml b/src/parser/Locate.ml index b25fe6c..a546a0d 100644 --- a/src/parser/Locate.ml +++ b/src/parser/Locate.ml @@ -1,7 +1,6 @@ open Earley_core let lexing_position i c = - Asai.Span.of_lex_position @@ Lexing.{ pos_fname = Input.filename i; pos_lnum = Input.line_num i; @@ -10,12 +9,6 @@ let lexing_position i c = (* This should be BYTE-oriented! *) } -let locate i1 c1 i2 c2 = - Asai.Span.make (lexing_position i1 c1) (lexing_position i2 c2) - let located p = p |> Earley.apply_position @@ fun i1 c1 i2 c2 x -> - Asai.Span.{ - value = x; - loc = Some (locate i1 c1 i2 c2); - } + Asai.Span.locate_lex (lexing_position i1 c1, lexing_position i2 c2) x