refactor match_expression to be a left-right expression