GSET
Targets

JavaScript Target

Implemented backend — Node.js output for the JS/TS frontend's own dialect.

Implemented

The JavaScript backend is implemented — gset transpile file.py -t js currently errors with no backend for target 'javascript'; supported: go.

Why JavaScript matters

JavaScript shares an IR lowering path with the TypeScript frontend (milestone M2), making it the second frontend and the natural companion to a JS-backend target for round-tripping TS/JS input.

What the backend will emit

ConstructImplemented output
print(...)console.log(...)
var declarationslet declarations
if / elif / elseif (…) {} else if (…) {}
while loopswhile (…) {} / indexed loops

The M2 gate

Generated JavaScript must pass node --check, gated on toolchain presence in CI. The Go-era engineering notes are explicit here: &&/|| emitted into Ruby and ?? emitted into Go are defect classes the rewrite exists to eliminate — nothing is emitted before the target's own checker can validate it.

Runtime

Requires node on PATH to run emitted output.

On this page