public override object Clone() //throws CloneNotSupportedException { CaseNode clone = (CaseNode)base.Clone(); clone.caseConditionNodes = new List <CaseConditionNode>(); foreach (CaseConditionNode condition in caseConditionNodes) { clone.caseConditionNodes.Add((CaseConditionNode)condition.Clone()); } return(clone); }
private Node parseCase() { Token token = expect(typeof (CaseToken)) ; CaseToken caseToken = (CaseToken) token; CaseNode node = new CaseNode(); node.setLineNumber(caseToken.getLineNumber()); node.setFileName(filename); node.setValue(caseToken.getValue()); node.setConditions(whenBlock()); return node; }