Construct an alternative pattern. The method setParent should not be called in this case. _left = left; _right = right;
setParent
_left = left; _right = right;
return _left;
double left = _left.getPriority(); double right = _right.getPriority(); if (left < right) return(left); else return(right);
return _right;
super.setParser(parser); _left.setParser(parser); _right.setParser(parser);
return "alternative(" + _left + ", " + _right + ')";
final InstructionList il = methodGen.getInstructionList(); _left.translate(classGen, methodGen); final InstructionHandle gotot = il.append(new GOTO(null)); il.append(methodGen.loadContextNode()); _right.translate(classGen, methodGen); _left._trueList.backPatch(gotot); _left._falseList.backPatch(gotot.getNext()); _trueList.append(_right._trueList.add(gotot)); _falseList.append(_right._falseList);
The type of an '|' is not really defined, hence null is returned. _left.typeCheck(stable); _right.typeCheck(stable); return null;
_left.typeCheck(stable); _right.typeCheck(stable); return null;