public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration) { FixAttributes(fieldDeclaration); fieldDeclaration.ReturnType.AcceptVisitor(this); ForceSpacesAfter(fieldDeclaration.ReturnType, true); FormatCommas(fieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma); var lastLoc = fieldDeclaration.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); } }
void IAstVisitor.VisitFieldDeclaration(FieldDeclaration fieldDeclaration) { Visit(EnterFieldDeclaration, LeaveFieldDeclaration, fieldDeclaration); }