Asama 5.2 — Implement C transpile backend (saqut transpile) #56

Closed
opened 2026-05-26 19:52:48 +03:00 by saqut · 0 comments
Owner

Goal: Convert saQut IR/AST to compilable C source code.

Files to create:

  • src/backend/c_transpile.hpp (new)

Requirements:

  • Reads IR and generates equivalent C code.
  • Handles: variable declarations, binary expressions, if/for/while/do-while, function definitions, return.
  • Generates readable C with #line directives.

Success criteria:

  • int main() { return 42; } generates compilable C that returns 42.
  • gcc -Wall -Werror passes without warnings.
**Goal:** Convert saQut IR/AST to compilable C source code. **Files to create:** - src/backend/c_transpile.hpp (new) **Requirements:** - Reads IR and generates equivalent C code. - Handles: variable declarations, binary expressions, if/for/while/do-while, function definitions, return. - Generates readable C with #line directives. **Success criteria:** - int main() { return 42; } generates compilable C that returns 42. - gcc -Wall -Werror passes without warnings.
saqut closed this issue 2026-06-14 21:53:17 +03:00
Sign in to join this conversation.
No description provided.