Add tree patterns