Skip to content

Commit

Permalink
Auto merge of #20097 - Manishearth:mutate-if-let, r=asajeffrey
Browse files Browse the repository at this point in the history
Do not mutate if let

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20097)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Feb 21, 2018
2 parents 0b4ea01 + 1fedba8 commit f90e98d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/servo/mutation/mutator.py
Expand Up @@ -65,7 +65,7 @@ def __init__(self):
class IfTrue(Strategy):
def __init__(self):
Strategy.__init__(self)
if_condition = r"(?<=if\s)(.*)(?=\s\{)"
if_condition = r"(?<=if\s)\s*(?!let\s)(.*)(?=\s\{)"
self._replace_strategy = {
'regex': if_condition,
'replaceString': 'true'
Expand All @@ -75,7 +75,7 @@ def __init__(self):
class IfFalse(Strategy):
def __init__(self):
Strategy.__init__(self)
if_condition = r"(?<=if\s)(.*)(?=\s\{)"
if_condition = r"(?<=if\s)\s*(?!let\s)(.*)(?=\s\{)"
self._replace_strategy = {
'regex': if_condition,
'replaceString': 'false'
Expand Down

0 comments on commit f90e98d

Please sign in to comment.