TSRX Playground
Real yuku-tsrx, compiled to WebAssembly, running in this tab: parse, analyze, generate.
export function Cart({ items }): unknown @{
const total = items.length;
<section className="cart">
@if (total > 0) {
@for (const item of items; index i; key item.id) {
<span>{i}:{item.id}</span>
} @empty {
<span>empty</span>
}
} @else {
<span>no cart</span>
}
<style>.cart { display: grid; }</style>
</section>
}
a TSRX component, highlighted with the TSRX grammar
tsx · module
The decoded program, as JSON. TSRX nodes keep their own names: JSXCodeBlock, TSRXExpression, JSXStyleElement.
Everything the parser reported for the current source, including the semantic early errors.
What the code generator prints for the current program.
Scopes, symbols, references and the module record from the analyzer.
the parser starts when this page loads