diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-04-15 22:06:04 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-04-15 22:06:04 +0000 |
commit | 001a56de3c85c1134e5901f23f6a4b8bb826518c (patch) | |
tree | e168538855b04c2e0ebd0ebef0f75f099da4f0cd /lib | |
parent | ecd4c983d94ffc3a22a5d043e615d40e55bad033 (diff) |
Adding newline after warning and restoring distinction between
fatal and non fatal identifier check errors.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15178 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.ml | 10 | ||||
-rw-r--r-- | lib/util.mli | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/util.ml b/lib/util.ml index 3a012acbb..85ff2cbc4 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -283,14 +283,14 @@ let initial_refutation j n s = | UnicodeLetter -> None | _ -> let c = String.sub s 0 j in - Some ("Invalid character '"^c^"' at beginning of identifier \""^s^"\".") + Some (false,"Invalid character '"^c^"' at beginning of identifier \""^s^"\".") let trailing_refutation i j n s = match classify_unicode n with | UnicodeLetter | UnicodeIdentPart -> None | _ -> let c = String.sub s i j in - Some ("Invalid character '"^c^"' in identifier \""^s^"\".") + Some (false,"Invalid character '"^c^"' in identifier \""^s^"\".") let ident_refutation s = if s = ".." then None else try @@ -308,9 +308,9 @@ let ident_refutation s = end |x -> x with - | End_of_input -> Some "The empty string is not an identifier." - | UnsupportedUtf8 -> Some (s^": unsupported character in utf8 sequence.") - | Invalid_argument _ -> Some (s^": invalid utf8 sequence.") + | End_of_input -> Some (true,"The empty string is not an identifier.") + | UnsupportedUtf8 -> Some (true,s^": unsupported character in utf8 sequence.") + | Invalid_argument _ -> Some (true,s^": invalid utf8 sequence.") let lowercase_unicode = let tree = Segmenttree.make Unicodetable.to_lower in diff --git a/lib/util.mli b/lib/util.mli index 380f58eab..d98551823 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -61,7 +61,7 @@ type utf8_status = UnicodeLetter | UnicodeIdentPart | UnicodeSymbol exception UnsupportedUtf8 -val ident_refutation : string -> string option +val ident_refutation : string -> (bool * string) option val classify_unicode : int -> utf8_status val lowercase_first_char_utf8 : string -> string val ascii_of_ident : string -> string |