Browse Source

grammar fixes.

Nicolas Cannasse 19 years ago
parent
commit
df7150c1c0
3 changed files with 6 additions and 6 deletions
  1. 2 2
      std/StringTools.hx
  2. 1 1
      std/tools/haxedoc/Main.hx
  3. 3 3
      typer.ml

+ 2 - 2
std/StringTools.hx

@@ -55,11 +55,11 @@ class StringTools {
 		return s.split("&gt;").join(">").split("&lt;").join("<").split("&amp;").join("&");
 		return s.split("&gt;").join(">").split("&lt;").join("<").split("&amp;").join("&");
 	}
 	}
 
 
-	public static function startWith( s : String, start : String ) {
+	public static function startsWith( s : String, start : String ) {
 		return( s.length >= start.length && s.substr(0,start.length) == start );
 		return( s.length >= start.length && s.substr(0,start.length) == start );
 	}
 	}
 
 
-	public static function endWith( s : String, end : String ) {
+	public static function endsWith( s : String, end : String ) {
 		var elen = end.length;
 		var elen = end.length;
 		var slen = s.length;
 		var slen = s.length;
 		return( slen >= elen && s.substr(slen-elen,elen) == end );
 		return( slen >= elen && s.substr(slen-elen,elen) == end );

+ 1 - 1
std/tools/haxedoc/Main.hx

@@ -275,7 +275,7 @@ class DocView {
 		var path = x.attributes.path;
 		var path = x.attributes.path;
 		if( try Reflect.field(x.attributes,"private") == "1" catch( e : Dynamic ) false )
 		if( try Reflect.field(x.attributes,"private") == "1" catch( e : Dynamic ) false )
 			return;
 			return;
-		if( StringTools.endWith(path,"__") )
+		if( StringTools.endsWith(path,"__") )
 			return;
 			return;
 		if( findEntry(entries,path.split(".")) != null )
 		if( findEntry(entries,path.split(".")) != null )
 			return;
 			return;

+ 3 - 3
typer.ml

@@ -1101,7 +1101,7 @@ let check_overloading c p () =
 			try
 			try
 				let f2 = PMap.find f.cf_name c.cl_fields in
 				let f2 = PMap.find f.cf_name c.cl_fields in
 				if not (type_eq false f.cf_type f2.cf_type) then error ("Field " ^ f.cf_name ^ " overload parent class with different or incomplete type") p;
 				if not (type_eq false f.cf_type f2.cf_type) then error ("Field " ^ f.cf_name ^ " overload parent class with different or incomplete type") p;
-				if f.cf_public <> f2.cf_public then error ("Field " ^ f.cf_name ^ " have different access right than previous one") p; 
+				if f.cf_public <> f2.cf_public then error ("Field " ^ f.cf_name ^ " has different access right than previous one") p; 
 			with
 			with
 				Not_found -> loop c.cl_super f
 				Not_found -> loop c.cl_super f
 	in
 	in
@@ -1112,8 +1112,8 @@ let check_interfaces c p () =
 		PMap.iter (fun i f ->
 		PMap.iter (fun i f ->
 			try
 			try
 				let t , f2 = class_field c i in
 				let t , f2 = class_field c i in
-				if f2.cf_public <> f.cf_public then error ("Field " ^ i ^ " have different access than in " ^ s_type_path intf.cl_path) p;
-				if not (type_eq false f2.cf_type (apply_params intf.cl_types params f.cf_type)) then error ("Field " ^ i ^ " have different type than in " ^ s_type_path intf.cl_path) p;
+				if f2.cf_public <> f.cf_public then error ("Field " ^ i ^ " has different access than in " ^ s_type_path intf.cl_path) p;
+				if not (type_eq false f2.cf_type (apply_params intf.cl_types params f.cf_type)) then error ("Field " ^ i ^ " has different type than in " ^ s_type_path intf.cl_path) p;
 			with
 			with
 				Not_found ->
 				Not_found ->
 					error ("Field " ^ i ^ " needed by " ^ s_type_path intf.cl_path ^ " is missing") p
 					error ("Field " ^ i ^ " needed by " ^ s_type_path intf.cl_path ^ " is missing") p