Mode mode, int precedence, double priority) {
// for a union pattern, register the parts separately
if (pattern instanceof UnionPattern) {
UnionPattern up = (UnionPattern)pattern;
Pattern p1 = up.getLHS();
Pattern p2 = up.getRHS();
setHandler(p1, eh, mode, precedence, priority);
setHandler(p2, eh, mode, precedence, priority);
return;
}
mode.addRule(pattern, eh, precedence, priority, true);