Quellcode durchsuchen

identifiers fix

Nicolas Cannasse vor 17 Jahren
Ursprung
Commit
7bb51e74e0
2 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  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.io.BytesData now uses strings instead of arrays for PHP
 	optimized line calculus from ast position
+	allow identifiers starting with _[0-9]
 
 2008-10-04: 2.01
 	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']*
 
 rule token = parse