瀏覽代碼

identifiers fix

Nicolas Cannasse 17 年之前
父節點
當前提交
7bb51e74e0
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      doc/CHANGES.txt
  2. 1 1
      lexer.mll

+ 1 - 0
doc/CHANGES.txt

@@ -14,6 +14,7 @@
 	haxe.xml.Check : treat comments the same as PCDATA spaces
 	haxe.xml.Check : treat comments the same as PCDATA spaces
 	haxe.io.BytesData now uses strings instead of arrays for PHP
 	haxe.io.BytesData now uses strings instead of arrays for PHP
 	optimized line calculus from ast position
 	optimized line calculus from ast position
+	allow identifiers starting with _[0-9]
 
 
 2008-10-04: 2.01
 2008-10-04: 2.01
 	fixed php.Sys
 	fixed php.Sys

+ 1 - 1
lexer.mll

@@ -159,7 +159,7 @@ let find_line_index idx p =
 
 
 }
 }
 
 
-let ident = ('_'* ['a'-'z'] ['_' 'a'-'z' 'A'-'Z' '0'-'9']* | '_')
+let ident = ('_'* ['a'-'z'] ['_' 'a'-'z' 'A'-'Z' '0'-'9']* | '_' | '_'+ ['0'-'9'] ['_' 'a'-'z' 'A'-'Z' '0'-'9']* )
 let idtype = '_'* ['A'-'Z'] ['_' 'a'-'z' 'A'-'Z' '0'-'9']*
 let idtype = '_'* ['A'-'Z'] ['_' 'a'-'z' 'A'-'Z' '0'-'9']*
 
 
 rule token = parse
 rule token = parse