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