             "\n",
             "extension \(scopeSwiftFullName) {\n")
           p.indent()
-          p.print("enum Extensions {\n")
+          p.print("\(visibility)enum Extensions {\n")
           p.indent()
           addNewline = false
         }

          p.print("}\n")
      }

      var currentScope: Descriptor? = nil
      var addNewline = true
      for e in extensions {


            p.print(
              comments,
              "\(visibility)\(scope)let \(swiftRelativeExtensionName) = SwiftProtobuf.MessageExtension<\(extensionFieldType)<\(traitsType)>, \(containingTypeSwiftFullName)>(\n")
            p.indent()
            p.print(
              "_protobuf_fieldNumber: \(fieldDescriptor.number),\n",
