Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix compilation of certain regexps
- Loading branch information
Showing
with
4 additions
and
0 deletions.
-
+1
−0
tests/objects/test_regexpobject.py
-
+3
−0
topaz/utils/regexp.py
|
@@ -49,6 +49,7 @@ def test_compile_regexps(self, space): |
|
|
/(?:a|b)*/ |
|
|
/.*/m |
|
|
/(.*|.+)/ |
|
|
/(?<=b)/ |
|
|
""") |
|
|
|
|
|
def test_regexp_syntax_errors(self, space): |
|
|
|
@@ -285,6 +285,9 @@ def __init__(self, value, case_insensitive=False, positive=True, zerowidth=False |
|
|
def rebuild(self, positive, case_insensitive, zerowidth): |
|
|
return Character(self.value, positive=positive, case_insensitive=case_insensitive, zerowidth=zerowidth) |
|
|
|
|
|
def getwidth(self): |
|
|
return 1, 1 |
|
|
|
|
|
def fix_groups(self): |
|
|
pass |
|
|
|
|
|