@ir-kit/compiler-swift
v0.2.0
Published
Typed Swift AST + printer. Build Swift source with a TypeScript-compiler-style factory API and print swift-format-clean output. Zero runtime dependencies.
Maintainers
Readme
@ir-kit/compiler-swift
Typed Swift AST and printer. Build Swift source through a TypeScript-compiler-style factory, then print it. Zero runtime dependencies.
The printer's snapshot suite is gated by the canonical Swift formatter (scripts/lint-swift.sh), so printed output is formatter-clean by construction.
Originally developed in typescript-compilers (Hey API); imported with full history.
Usage
import { swift } from "@ir-kit/compiler-swift";
const file = swift.factory.createSourceFile(/* ... */);
const source = swift.createPrinter().printFile(file);