Module genco::lang::swift

source ·
Expand description

Specialization for Swift code generation.

String Quoting in Swift

Swift uses UTF-8 internally, string quoting is with the exception of escape sequences a one-to-one translation.

use genco::prelude::*;

let toks: swift::Tokens = quote!("start π 😊 \n \x7f ÿ $ end");
assert_eq!("\"start π 😊 \\n \\u{7f} ÿ $ end\"", toks.to_string()?);

Structs

  • Configuration for formatting Swift code.
  • Format state for Swift code.
  • The import of a Swift type import UIKit.
  • Swift token specialization.

Enums

  • A type-erased language item capable of holding any kind.

Functions

  • The import of a Swift type import UIKit.

Type Definitions

  • Tokens container specialization for Rust.