// Clone will clone this ThenExpressionList. The new clone will have an identical structure
Clone will clone this ThenExpressionList. The new clone will have an identical structure
// Clone will clone this ThenExpressionList . The new clone will have an identical structure
func (e *ThenExpressionList) Clone(cloneTable *pkg.CloneTable) *ThenExpressionList {
	clone := &ThenExpressionList{
		AstID:   unique.NewID(),
		GrlText: e.GrlText,
	}
	if e.ThenExpressions != nil {
		clone.ThenExpressions = make([]*ThenExpression, len(e.ThenExpressions))
		for k, expr := range e.ThenExpressions {
			if cloneTable.IsCloned(expr.AstID) {
				clone.ThenExpressions[k] = cloneTable.Records[expr.AstID].CloneInstance.(*ThenExpression)
			} else {
				cloned := expr.Clone(cloneTable)
				clone.ThenExpressions[k] = cloned
				cloneTable.MarkCloned(expr.AstID, cloned.AstID, expr, cloned)
			}
		}
	}
	return clone
}
func ( e * ThenExpressionList ) Clone ( cloneTable * pkg . CloneTable ) * ThenExpressionList { clone := & ThenExpressionList { AstID : unique . NewID ( ) , GrlText : e . GrlText , } if e . ThenExpressions != nil { clone . ThenExpressions = make ( [ ] * ThenExpression , len ( e . ThenExpressions ) ) for k , expr := range e . ThenExpressions { if cloneTable . IsCloned ( expr . AstID ) { clone . ThenExpressions [ k ] = cloneTable . Records [ expr . AstID ] . CloneInstance . ( * ThenExpression ) } else { cloned := expr . Clone ( cloneTable ) clone . ThenExpressions [ k ] = cloned cloneTable . MarkCloned ( expr . AstID , cloned . AstID , expr , cloned ) } } } return clone }
Clone will clone this ThenExpressionList.
Clone will clone this ThenExpressionList .