Example #1
0
        public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
        {
            FixAttributesAndDocComment(fieldDeclaration);

            fieldDeclaration.ReturnType.AcceptVisitor(this);
            ForceSpacesAfter(fieldDeclaration.ReturnType, true);

            FormatCommas(fieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma);

            var lastLoc = fieldDeclaration.ReturnType.StartLocation;

            foreach (var initializer in fieldDeclaration.Variables)
            {
                if (lastLoc.Line != initializer.StartLocation.Line)
                {
                    curIndent.Push(IndentType.Block);
                    FixStatementIndentation(initializer.StartLocation);
                    curIndent.Pop();
                    lastLoc = initializer.StartLocation;
                }
                initializer.AcceptVisitor(this);
            }
            FixSemicolon(fieldDeclaration.SemicolonToken);
        }
Example #2
0
 void IAstVisitor.VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
 {
     Visit(EnterFieldDeclaration, LeaveFieldDeclaration, fieldDeclaration);
 }
 public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
 {
     // skip
 }