Commit 9d91d799 authored by POTTIER Francois's avatar POTTIER Francois

Avoid [String.capitalize] in [Settings].

parent cfed683d
......@@ -14,8 +14,15 @@ let token_type_mode =
let tokentypeonly () =
token_type_mode := TokenTypeOnly
let is_uppercase_ascii c =
c >= 'A' && c <= 'Z'
let is_capitalized_ascii s =
String.length s > 0 &&
is_uppercase_ascii s.[0]
let codeonly m =
if String.capitalize m <> m then begin
if not (is_capitalized_ascii m) then begin
(* Not using module [Error] to avoid a circular dependency. *)
fprintf stderr "Error: %s is not a valid OCaml module name.\n" m;
exit 1
......
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