ProtoCompilerContext.swift 923 B

123456789101112131415161718192021222324
  1. // Sources/SwiftProtobufPluginLibrary/ProtoCompilerContext.swift
  2. //
  3. // Copyright (c) 2014 - 2023 Apple Inc. and the project authors
  4. // Licensed under Apache License v2.0 with Runtime Library Exception
  5. //
  6. // See LICENSE.txt for license information:
  7. // https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt
  8. //
  9. // -----------------------------------------------------------------------------
  10. ///
  11. /// This provides some basic interface about the protocol buffer compiler
  12. /// being used to generate.
  13. ///
  14. // -----------------------------------------------------------------------------
  15. import Foundation
  16. /// Abstact interface to get information about the protocol buffer compiler
  17. /// being used for generation.
  18. public protocol ProtoCompilerContext {
  19. /// The version of the protocol buffer compiler (if it was provided in the
  20. /// generation request).
  21. var version: Google_Protobuf_Compiler_Version? { get }
  22. }