···2020 | Math of math_mode * t
2121 | Ident of Trie.path
2222 | Hash_ident of string
2323- | Angle_ident of string
2323+ | Xml_ident of string option * string
2424 | Subtree of string option * t
2525 | Let of Trie.path * Trie.path binding list * t
2626 | Open of Trie.path
+2-2
lib/compiler/Expand.ml
···8585 | { value = Ident path; loc } :: rest ->
8686 let out, rest = expand_method_calls (expand_ident loc path) rest in
8787 out @ expand rest
8888- | { value = Angle_ident name; loc } :: rest ->
8989- let qname = expand_xml_ident loc @@ Forester_xml_names.split_xml_qname name in
8888+ | { value = Xml_ident (prefix, uname); loc } :: rest ->
8989+ let qname = expand_xml_ident loc (prefix, uname) in
9090 let attrs, rest = get_xml_attrs [] rest in
9191 let arg_opt, rest = get_arg_opt rest in
9292 let tag = Syn.Xml_tag (qname, attrs, Option.value ~default: [] arg_opt) in
···4455module I = Grammar.MenhirInterpreter
6677-let lexer lexbuf = Lexer.token lexbuf
77+let buffer_lexer lexer =
88+ let buf = ref [] in
99+ let rec loop lexbuf =
1010+ match !buf with
1111+ | v :: vs ->
1212+ buf := vs; v
1313+ | [] ->
1414+ match lexer lexbuf with
1515+ | v :: vs -> buf := vs @ !buf; v
1616+ | [] -> loop lexbuf
1717+ in
1818+ loop
1919+2020+let lexer =
2121+ let@ lexbuf = buffer_lexer in
2222+ match Stack.top @@ Lexer.mode_stack with
2323+ | Main -> Lexer.token lexbuf
2424+ | Ident_init -> Lexer.ident_init lexbuf
2525+ | Ident_fragments -> Lexer.ident_fragments lexbuf
2626+ | Verbatim (herald, buffer) -> Lexer.verbatim herald buffer lexbuf
827928(* debugging helpers *)
1029let _string_of_token token =
+1-1
lib/forest/Forest.ml
···154154 | false ->
155155 Hashtbl.add resources iri resource
156156 | true ->
157157- Reporter.emitf Duplicate_tree "Already planted resource at address %a" pp_iri iri
157157+ ()
158158159159 let get_resource iri =
160160 let iri = Iri.normalize iri in
+1-5
lib/frontend/DSL.ml
···2424let img href = X.(Img (Remote href))
2525let content c = X.Content c
26262727-let xml_elt name content =
2727+let xml_elt (prefix, uname) content =
2828 let open Forester_compiler in
2929- let prefix, uname =
3030- Lexer.xml_qname (Lexing.from_string name)
3131- |> Forester_xml_names.split_xml_qname
3232- in
3329 let prefix = Option.value ~default: "" prefix in
3430 let qname = X.{ prefix; uname; xmlns = None } in
3531 X.Xml_elt
+1-1
lib/frontend/Import_graph.ml
···4343 | Dx_query (_, positives, negatives) ->
4444 List.iter (analyse_code roots) positives;
4545 List.iter (analyse_code roots) negatives
4646- | Text _ | Hash_ident _ | Angle_ident _ | Verbatim _ | Ident _ | Open _ | Put _ | Default _ | Get _ | Decl_xmlns _ | Call _ | Alloc _ | Dx_var _ | Dx_const_content _ | Dx_const_iri _ -> ()
4646+ | Text _ | Hash_ident _ | Xml_ident _ | Verbatim _ | Ident _ | Open _ | Put _ | Default _ | Get _ | Decl_xmlns _ | Call _ | Alloc _ | Dx_var _ | Dx_const_content _ | Dx_const_iri _ -> ()
4747 in
4848 begin
4949 let@ tree = List.iter @~ trees in