Anonymous committed 3f32fa7

Use Cf_lex instead of deprecated Cf_lexer.

Comments (0)

Files changed (1)


 type 'a t = (Xml_event.t, 'a) Cf_parser.t
 open Cf_parser.Op
-open Cf_lexer.Op
+open Cf_lex.Op
 let character_data =
     Cf_parser.tok begin function
     let x_white = !+(!^(is_white true)) in
     let x_token = !+(!^(is_white false)) in
-    let cursor = new Cf_lexer.cursor 0 in
-    let lexer = Cf_lexer.create !@[
-        x_token $^ (fun x -> Some x);
+    let lexer = Cf_lex.create !@[
         x_white $= None;
+        x_token $> (fun x -> Some x);
     ] in
     fun s ->
         let rec loop acc sx =
             match lexer sx with
-            | None -> Some (List.rev acc, Cf_seq.first sx)
+            | None -> Some (List.rev acc, sx)
             | Some (None, sx) -> loop acc sx
             | Some (Some tok, sx) -> loop (tok :: acc) sx
-        loop [] (Cf_parser.X.weave cursor s)
+        loop [] s
 let standalone_document content =
     xml_decl >>= fun decl ->
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.