示例#1
0
        public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
        {
            FixAttributesAndDocComment(fixedFieldDeclaration);

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

            var lastLoc = fixedFieldDeclaration.StartLocation;

            curIndent.Push(IndentType.Block);
            foreach (var initializer in fixedFieldDeclaration.Variables)
            {
                if (lastLoc.Line != initializer.StartLocation.Line)
                {
                    FixStatementIndentation(initializer.StartLocation);
                    lastLoc = initializer.StartLocation;
                }
                initializer.AcceptVisitor(this);
            }
            curIndent.Pop();
            FixSemicolon(fixedFieldDeclaration.SemicolonToken);
        }
示例#2
0
 void IAstVisitor.VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
 {
     Visit(EnterFixedFieldDeclaration, LeaveFixedFieldDeclaration, fixedFieldDeclaration);
 }