#!/usr/bin/env python3 """ el_ui_native_codegen.py — el-ui component → el-native codegen pass. Reads a .el component file using the el-ui native component DSL and emits valid el code that calls the el-native vessel API (vstack, label, button, widget_set_text, etc.). Usage: python3 el_ui_native_codegen.py # writes to stdout python3 el_ui_native_codegen.py -o out.el The output is a standalone .el file that can be compiled with elc and linked against the el-native vessel. It is semantically equivalent to what a human would write by hand (as demonstrated in native-hello/src/App.el). Input format (native component DSL): component App { state { counter: Int = 0 input_text: String = "" } fn increment(widget: Int, data: String) -> Void { state.counter = state.counter + 1 } template {