Commit 19474f4c authored by Julien Lopez's avatar Julien Lopez

Fix on parsing of type variables in brackets

parent 0805d2b9
...@@ -279,7 +279,7 @@ and token2 = lexer ...@@ -279,7 +279,7 @@ and token2 = lexer
return lexbuf (STRING2 s) return lexbuf (STRING2 s)
| "('" qname ")" -> | "('" qname ")" ->
let s = L.utf8_lexeme lexbuf in let s = L.utf8_lexeme lexbuf in
let s = String.sub s 1 (String.length s - 1) in let s = String.sub s 2 (String.length s - 3) in
return lexbuf (PTYPE s) return lexbuf (PTYPE s)
| "(*" -> | "(*" ->
in_comment := true; in_comment := true;
......
...@@ -5,8 +5,6 @@ open Schema_pcre ...@@ -5,8 +5,6 @@ open Schema_pcre
open Schema_common open Schema_common
open Schema_types open Schema_types
module Pcre = Re_pcre
(* TODO dates: boundary checks (e.g. 95/26/2003) *) (* TODO dates: boundary checks (e.g. 95/26/2003) *)
(* TODO a lot of almost cut-and-paste code, expecially in gFoo types validation (* TODO a lot of almost cut-and-paste code, expecially in gFoo types validation
*) *)
......
open Encodings.Utf8 open Encodings.Utf8
module Pcre = Re_pcre
let pcre_replace ~rex ?templ s = let pcre_replace ~rex ?templ s =
match templ with match templ with
| None -> mk (Pcre.replace ~rex (get_str s)) | None -> mk (Pcre.replace ~rex (get_str s))
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* Given Pcre.regexp regular expressions should be compiled with `UTF8 flag * Given Pcre.regexp regular expressions should be compiled with `UTF8 flag
* or with pcre_regexp below *) * or with pcre_regexp below *)
open Encodings.Utf8 open Encodings.Utf8
module Pcre = Re_pcre
val pcre_regexp: string -> Pcre.regexp (* compile using `UTF8 flag *) val pcre_regexp: string -> Pcre.regexp (* compile using `UTF8 flag *)
val pcre_replace: rex:Pcre.regexp -> ?templ:t -> t -> t val pcre_replace: rex:Pcre.regexp -> ?templ:t -> t -> t
val pcre_extract: rex:Pcre.regexp -> t -> t array val pcre_extract: rex:Pcre.regexp -> t -> t array
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment