           p.print("}\n")
       }
 
+      let visibility = generatorOptions.visibilitySourceSnippet
       var currentScope: Descriptor? = nil
       var addNewline = true
       for e in extensions {

        }

        func generateProtobufExtensionDeclarations(printer p: inout CodePrinter) {
            let scope = fieldDescriptor.extensionScope == nil ? "" : "static "
            let traitsType = fieldDescriptor.traitsType(namer: namer)
            let swiftRelativeExtensionName = namer.relativeName(extensionField: fieldDescriptor)


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