Skip to content
Permalink
Browse files

Fixed #824 -- corrected a crash when lookarounds were used in branches

  • Loading branch information
alex committed Oct 20, 2013
1 parent dce3eef commit fa28c22acc52d3ccffb310fc3180a2153dafe449
Showing with 4 additions and 0 deletions.
  1. +1 −0 tests/objects/test_regexpobject.py
  2. +3 −0 topaz/utils/regexp.py
@@ -52,6 +52,7 @@ def test_compile_regexps(self, space):
/(?<=b)/
/\\A|\\z/
/[[:alnum:]]/
/(?=a)|b/
""")

def test_regexp_syntax_errors(self, space):
@@ -683,6 +683,9 @@ def __init__(self, subpattern, behind, positive):
def fix_groups(self):
self.subpattern.fix_groups()

def can_be_affix(self):
return self.subpattern.can_be_affix()

def optimize(self, info, in_set=False):
return LookAround(self.subpattern.optimize(info), self.behind, self.positive)

0 comments on commit fa28c22

Please sign in to comment.