Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public virtual void ExitSetterDeclaration(SetterDeclaration setterDeclaration)
 {
 }
Esempio n. 4
0
 public override void EnterSetterDeclaration(SetterDeclaration setterDeclaration)
 {
     EnterMethodOrGetterOrSetter(setterDeclaration);
 }
Esempio n. 5
0
 public virtual T VisitSetterDeclaration(SetterDeclaration setterDeclaration)
 {
     return(VisitChildren(setterDeclaration));
 }