public override object VisitNamespaceDeclaration(NamespaceNode namespaceDeclaration, object data) { if (namespaceDeclaration.Name == null) { return(null); } builder.AppendLine("namespace " + namespaceDeclaration.Name.GenericIdentifier); builder.BeginScope(); { } builder.EndScope(); return(base.VisitNamespaceDeclaration(namespaceDeclaration, data)); }
public void Double_indentation_works_as_expected() { builder.AppendLine("a();").Indent().Indent().Append("b();"); Assert.AreEqual(@"a(); b();", builder.ToString()); }