示例#1
0
        internal override SemanticItem Clone()
        {
            var parameter = new TypeParameter(null, ModeWord.Text, IsLast)
            {
                _items = _items
            };

            parameter._items.Clear();
            foreach (var item in _items)
            {
                var newItem = item.Clone();
                parameter._items.Add(newItem);
                newItem._parent = parameter;
            }

            parameter.ModeWord = (Word)parameter._items.First(x => x.HasType(EItemType.ModeModifier));
            parameter.TypeWord = parameter._items.First(x => x.HasType(EItemType.Type));
            return(parameter);
        }
 public InsertParameterCommand(List <SemanticItem> items, TypeParameter insertedParameter, int index)
 {
     _items            = items;
     InsertedParameter = insertedParameter;
     Index             = index;
 }
 public DeleteParameterCommand(List <SemanticItem> parameters, TypeParameter deletedParameter)
 {
     _items           = parameters;
     DeletedParameter = deletedParameter;
     Index            = _items.IndexOf(DeletedParameter);
 }