diff --git a/lib/read.mli b/lib/read.mli index 43746bbe..d89dd040 100644 --- a/lib/read.mli +++ b/lib/read.mli @@ -143,7 +143,7 @@ val map_ident : lexer_state -> (string -> int -> int -> 'a) -> Lexing.lexbuf -> 'a (* equivalent to read_ident *) -type variant_kind = [ `Edgy_bracket | `Square_bracket | `Double_quote ] +type variant_kind = [ `Square_bracket | `Double_quote ] val start_any_variant : lexer_state -> Lexing.lexbuf -> variant_kind val read_lt : lexer_state -> Lexing.lexbuf -> unit diff --git a/lib/read.mll b/lib/read.mll index a346ea5f..a7800ddc 100644 --- a/lib/read.mll +++ b/lib/read.mll @@ -153,7 +153,7 @@ let len = lexbuf.lex_curr_pos - lexbuf.lex_start_pos in f (Bytes.sub_string lexbuf.lex_buffer lexbuf.lex_start_pos len) 0 len - type variant_kind = [ `Edgy_bracket | `Square_bracket | `Double_quote ] + type variant_kind = [ `Square_bracket | `Double_quote ] type tuple_kind = [ `Parenthesis | `Square_bracket ] } @@ -364,7 +364,6 @@ and read_comma v = parse | eof { custom_error "Unexpected end of input" v lexbuf } and start_any_variant v = parse - '<' { `Edgy_bracket } | '"' { Buffer.clear v.buf; `Double_quote } | '[' { `Square_bracket } @@ -624,7 +623,6 @@ and read_colon v = parse | eof { custom_error "Unexpected end of input" v lexbuf } and start_any_tuple v = parse - '(' { false } | '[' { true } | _ { long_error "Expected '(' or '[' but found" v lexbuf } | eof { custom_error "Unexpected end of input" v lexbuf } diff --git a/test/testable.ml b/test/testable.ml index 5729a9e7..a340bf2d 100644 --- a/test/testable.ml +++ b/test/testable.ml @@ -1,13 +1,11 @@ let yojson = Alcotest.testable Yojson.Safe.pp Yojson.Safe.equal let variant_kind_pp fmt = function - | `Edgy_bracket -> Format.fprintf fmt "`Edgy_bracket" | `Square_bracket -> Format.fprintf fmt "`Square_bracket" | `Double_quote -> Format.fprintf fmt "`Double_quote" let variant_kind_equal a b = match (a, b) with - | `Edgy_bracket, `Edgy_bracket -> true | `Square_bracket, `Square_bracket -> true | `Double_quote, `Double_quote -> true | _ -> false