import Foundation /// A protected token that must survive translation (`docs/TRANSLATION_OUTPUT.md` §4). public struct ProtectedToken: Sendable, Equatable, Hashable { /// The token kind. public let kind: ProtectedTokenKind /// The exact text that must appear in the translation. public let value: String /// Creates a protected token. public init(kind: ProtectedTokenKind, value: String) { self.kind = kind self.value = value } } /// The protected-token kinds from `docs/TRANSLATION_OUTPUT.md` §4. public enum ProtectedTokenKind: String, Sendable, Equatable, CaseIterable { /// `https://…`, `http://…`, `www.…` case url /// `name@example.com` case email /// `{{name}}`, `{{ name }}` case mustache /// `${name}` case templateLiteral /// `%s`, `%d`, `%1$@`, `%02d` case printf /// `` `code` `` case codeSpan /// A fenced code block. case fencedCode /// ``, `` case htmlTag /// A quoted JSON key followed by `:`. case jsonKey /// `/Users/…`, `C:\…` case filePath }