The patterns must correspond to language syntax categories; in this case, both patterns must be of syntax category statement also separated in sympathy with the patterns by ->.
The patterns need to align with language syntactic structures; specifically, both patterns must belong to the statement category and be delineated from each other using ->.