Implement necessary methods in Match, TPEStack, PatternNode