Skip to content

Commit

Permalink
allow \uXXXX in regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Feb 28, 2012
1 parent 2f20408 commit 15b9e71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
all : fixed DCE removing empty but still used interfaces/superclasses
all : added haxe.Utf8 (crossplatform)
neko : Reflect now uses $fasthash (require neko 1.8.2)
all : allow \uXXXX in regexp (although not supported everywhere)

2011-09-25: 2.08
js : added js.JQuery
Expand Down
1 change: 1 addition & 0 deletions lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ and regexp = parse
| '\\' 't' { add "\t"; regexp lexbuf }
| '\\' ['\\' '$' '.' '*' '+' '^' '|' '{' '}' '[' ']' '(' ')' '?' '-' '0'-'9'] { add (lexeme lexbuf); regexp lexbuf }
| '\\' ['w' 'W' 'b' 'B' 's' 'S' 'd' 'D' 'x'] { add (lexeme lexbuf); regexp lexbuf }
| '\\' ['u' 'U'] ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F'] { add (lexeme lexbuf); regexp lexbuf }
| '\\' [^ '\\'] { error (Invalid_character (lexeme lexbuf).[1]) (lexeme_end lexbuf - 1) }
| '/' { regexp_options lexbuf, lexeme_end lexbuf }
| [^ '\\' '/' '\r' '\n']+ { store lexbuf; regexp lexbuf }
Expand Down

0 comments on commit 15b9e71

Please sign in to comment.