You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: language-server/tests/common.ml
+4-2
Original file line number
Diff line number
Diff line change
@@ -74,9 +74,11 @@ let rec parse : type a. int -> int -> Document.sentence list -> Document.parsing
74
74
|O, [], [] -> Ok()
75
75
|Pspec, s :: l, errors ->
76
76
parse (m+1) n l errors spec >>= (funa -> Ok(ss_of_s s,a))
77
-
|Espec, sentences, error :: l ->
77
+
|E_, [], error :: _ ->
78
+
Error ("erroneous sentence not part of the document. Corresponding error is "^Pp.string_of_ppcmds @@ snd error.Document.msg)
79
+
|Espec, _ :: sentences, error :: l ->
78
80
parse m (n+1) sentences l spec >>= (funa -> Ok(error,a))
79
-
|O, (_ :: _asl), _ -> Error ("more sentences than expected, extra "^Int.to_string (List.length l))
81
+
|O, (s :: _asl), _ -> Error ("more sentences than expected, extra "^Int.to_string (List.length l)^". Extra sentence is "^Document.Internal.string_of_sentence s)
80
82
|O, _, (_ :: _asl) -> Error ("more errors than expected, extra "^Int.to_string (List.length l))
81
83
|P_, [], errors ->
82
84
let errors =String.concat ~sep:"\n"@@List.map ~f:(funerr -> Pp.string_of_ppcmds @@ snd err.Document.msg) errors in
0 commit comments