3 ms·
I built a code generator package in Kotlin which generates codes for Kotlin, Swift, Web (JS), and React-Native (TypeScript). Basically, you provide your class d
by rahulrrixe 7y ago
I built a code generator package in Kotlin which generates codes for Kotlin, Swift, Web (JS), and React-Native (TypeScript). Basically, you provide your class definition in a DSL style (Similar to TOML) and it will generate the implementation and interfaces of the bridge for different technologies.
- s66qnf92 7y agoThis is great! We're working on code generation from class definitions right now. Any good resources worth looking at?
- rahulrrixe 7y agoI started by checking how you can write HTML using Kotlin DSL. Here is the source code https://github.com/Kotlin/kotlinx.html https://github.com/Kotlin/kotlinx.html Now, I have to generate different languages once the DSL is finalized. To achieve this I use Flask framework architecture. There we have routes with HTML templates. Here each generator has its own templates.
- ioddly 7y agoNot familiar with GPs use case but TypeScript has a glorious compiler API that could handle the heavy lifting here.