소스 검색

fixed issue #922

Nicolas Cannasse 13 년 전
부모
커밋
01ad4beab6
2개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 3
      ast.ml
  2. 0 1
      doc/CHANGES.txt

+ 7 - 3
ast.ml

@@ -258,9 +258,13 @@ type type_decl = type_def * pos
 type package = string list * type_decl list
 
 let is_lower_ident i =
-	match String.unsafe_get i 0 with
-	| 'a'..'z' | '_' -> true
-	| _ -> false
+	let rec loop p =
+		match String.unsafe_get i p with
+		| 'a'..'z' -> true
+		| '_' -> if p + 1 < String.length i then loop (p + 1) else true
+		| _ -> false
+	in
+	loop 0
 
 let pos = snd
 

+ 0 - 1
doc/CHANGES.txt

@@ -43,7 +43,6 @@
 	all : no longer automatically type arrays of mixed content as Array<Dynamic> (type must be explicit)
 	all : allow @:overload to use type parameters and not-absolute type paths
 	all : ensure that Std.string of arrays and enums are now consistent across platforms
-	all : no longer allow type names to start with one or several underscores
 	all : allow to inline functions containing other functions
 
 2012-04-14: 2.09