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); }
public bool CheckField(ICS.FieldDeclaration node, InspectionData data) { if ((MatchKind != 0 && (MatchKind & DeclarationKinds.Field) == 0)) { return(false); } if (!CheckAttributedNode(node, ICS.Modifiers.Private)) { return(false); } foreach (var v in node.Variables) { string name = v.Name; if (IsValid(name)) { continue; } data.Add(GetFixableResult(v.NameToken.StartLocation, null, name)); } return(true); }
void IAstVisitor.VisitFieldDeclaration(FieldDeclaration fieldDeclaration) { Visit(EnterFieldDeclaration, LeaveFieldDeclaration, fieldDeclaration); }
public virtual S VisitFieldDeclaration(FieldDeclaration fieldDeclaration, T data) { return(VisitChildren(fieldDeclaration, data)); }
public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration) { // skip }
public virtual S VisitFieldDeclaration(FieldDeclaration fieldDeclaration, T data) { throw new NotImplementedException(); }