Skip to content

Commit

Permalink
fix ticket #279, related to date parsing but actually a regexp bug
Browse files Browse the repository at this point in the history
--HG--
branch : com.mozilla.es4.smlnj
extra : convert_revision : 4afcb0d82ded6ab795dcbadde614aa2328e1e056
  • Loading branch information
graydon committed Jan 11, 2008
1 parent a47b8e3 commit 5f0cd81
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions builtins/RegExpCompiler.es
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ package RegExpInternals

switch (peekCharCode()) {
case 0x29u /* ")" */:
skip();
return null;

case 0x2Eu /* "." */:
Expand Down Expand Up @@ -286,11 +287,17 @@ package RegExpInternals
match(")");
return new Capturing(d, capno);

case 0x5Bu /* "[" */:
return characterClass();
case 0x5Bu /* "[" */: {
let m : Matcher = characterClass();
skip();
return m;
}

case 0x5Cu /* "\\" */:
return atomEscape();
case 0x5Cu /* "\\" */: {
let m : Matcher = atomEscape();
skip();
return m;
}

case 0x5Eu /* "^" */:
case 0x24u /* "$" */:
Expand All @@ -301,6 +308,7 @@ package RegExpInternals
case 0x7Cu /* "|" */:
// case 0x7Du /* "}" */:
// case 0x5Du /* "]" */:
skip();
return null;

default: {
Expand Down

0 comments on commit 5f0cd81

Please sign in to comment.