public new Expression Clone() { var expression = new Expression(); expression.Text = Text; if (Loc != null) { expression.Loc = Loc.Clone(); } expression.Leng = Leng; expression.LineNo = LineNo; expression.ValueSet = ValueSet; expression.Type = Type; expression.ValueSet = ValueSet; expression.BoolValue = BoolValue; if (Children != null) { expression.Children = new JList <Expression>(); foreach (var child in Children) { if (this != child) { expression.Children.Add(child.Clone()); } } } expression.DoubleValue = DoubleValue; return(expression); }