Permalink
Browse files

fix regex parse bug

  • Loading branch information...
1 parent 559728d commit 854a594b465a7069d5631e0b8422dcf18a995e0c @zaach zaach committed Jun 28, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/lexer.l
  2. +1 −0 test/reflect-parse.js
View
2 lib/lexer.l
@@ -4,7 +4,7 @@ exp ([eE][-+]?[0-9]+)
frac ("."[0-9]+)
IDS [a-zA-Z$_]|"\u"[a-fA-F0-9]{4}
BSL "\\".
-RCLASS "["({BSL}|[^\\[])*"]"
+RCLASS "["({BSL}|[^\\\]])*"]"
%%
View
1 test/reflect-parse.js
@@ -639,6 +639,7 @@ assertDecl("function f(a,b,c) { function b() { } }",
// expressions
+assertStmt("{(/[]/,']');/1/}", blockStmt([exprStmt(seqExpr([lit(/[]/),lit("]")])),exprStmt(lit(/1/))]));
assertExpr("true", lit(true));
assertExpr("false", lit(false));

0 comments on commit 854a594

Please sign in to comment.