public override INode VisitSetterDeclaration(SetterDeclaration setterDeclaration) { var clone = new SetterDeclaration(setterDeclaration.Context, setterDeclaration.Name, setterDeclaration.Children.Select(Visit)); clone.Modifiers.AddRange(setterDeclaration.Modifiers); return(clone); }
private void ConvertToMethod(SetterDeclaration setterDeclaration) { var methodDeclaration = new MethodDeclaration( setterDeclaration.Context, "set" + setterDeclaration.Name[0].ToString().ToUpper() + setterDeclaration.Name.Substring(1), new VoidType(setterDeclaration.Context).Yield() .Concat <INode>(setterDeclaration.Parameter.Yield()) .Concat(setterDeclaration.Body.Yield()) ); methodDeclaration.Modifiers.AddRange(setterDeclaration.Modifiers); setterDeclaration.ReplaceWith(methodDeclaration); replacedSetters.Add(setterDeclaration, methodDeclaration); }
public virtual void ExitSetterDeclaration(SetterDeclaration setterDeclaration) { }
public override void EnterSetterDeclaration(SetterDeclaration setterDeclaration) { EnterMethodOrGetterOrSetter(setterDeclaration); }
public virtual T VisitSetterDeclaration(SetterDeclaration setterDeclaration) { return(VisitChildren(setterDeclaration)); }