mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
Issue #433028: Added support of modifier spans in regular expressions.
This commit is contained in:
parent
ee73a65745
commit
be9a4e5c85
7 changed files with 180 additions and 66 deletions
|
@ -352,7 +352,7 @@ class Scanner:
|
|||
for phrase, action in lexicon:
|
||||
gid = s.opengroup()
|
||||
p.append(sre_parse.SubPattern(s, [
|
||||
(SUBPATTERN, (gid, sre_parse.parse(phrase, flags))),
|
||||
(SUBPATTERN, (gid, 0, 0, sre_parse.parse(phrase, flags))),
|
||||
]))
|
||||
s.closegroup(gid, p[-1])
|
||||
p = sre_parse.SubPattern(s, [(BRANCH, (None, p))])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue