<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add(self, rule: 'functions.ReplacementRule') -> None: """Add a new rule to the replacer. Args: rule: The rule to add. """

        self.matcher.add(rule.pattern, rule.replacement)