示例#1
0
        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);
        }
示例#2
0
 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;
 }