Examples
The examples gallery is generated from the repository’s executable cases. Each case is one language rule, compiled to TypeScript, Python, and Go, with the generated code, a calling program for each target, and the stdout that program produced.
The gallery is built by scripts/playground.sh, which also runs the three conformance suites. A case is listed only after all three targets pass.
What is in a case
Each case has a source file, metadata, and tests. The generated page shows:
- the
.ltsource and why the rule exists; - the emitted module for each target;
- a runnable usage program that calls the emitted library;
- the stdout that program produced on that machine.
The gallery is static: it works from file:// and from the documentation site.
Related
- Playground — edit and compile in the browser.
- Tests — write your own
testblocks. playground/cases— the source of every case.