nandi/code-transpiler-rust-frontend-findingspublic Fork 0
5375d17f26e5be6bd30310edeabaaa1211437b03
Commits
Clone
git clone https://git.rickub.com/nandi/code-transpiler-rust-frontend-findings.git
git clone ssh://git@rickub.com/nandi/code-transpiler-rust-frontend-findings.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

EXPECTED.md · 32 lines · 1.8 KBmarkdown Blame HistoryRaw
Reproducible bug report for the Rust frontend in Code-Transpiler 5375d17 nandi 20h ago1# Expected output of ./repro.sh
2
3Recorded against upstream `main` as of 2026-09-18, Go 1.27.1, linux/amd64.
4
5```
6=== CLI: rust -> nim (exit code, then stderr tail) ===
700-comment-fails.rs exit=0 <no error> emitted:
800-comment.rs exit=0 <no error> emitted:
901-trivial.rs exit=0 <no error> emitted:
1002-if-block.rs exit=0 <no error> emitted:
1103-macro.rs exit=0 <no error> emitted:
1204-lifetime.rs exit=1 r2many: unmatched delimiter ")" at 47
13
14=== Frontend prober: UAST node kinds actually produced ===
1500-comment-fails.rs err: expected expression near "/"
1600-comment.rs node kinds: map[CALL:1 CONTROL:1 DISPATCH:1 EFFECT:3 MEMORY:1 SYMBOL:2 block:4 call:2 expression:4 identifier:4 lvalue:1 program:1 temporary:1 unknown:9]
1701-trivial.rs node kinds: map[CALL:1 CONTROL:2 DISPATCH:2 EFFECT:4 MEMORY:1 SYMBOL:7 assign:4 binary:2 block:4 builtin:1 call:2 expression:8 identifier:16 lvalue:1 program:1 temporary:1 unknown:20]
1802-if-block.rs err: expected "" near "s"
1903-macro.rs err: expected "" near ","
2004-lifetime.rs err: expected expression near ")"
2105-equivalent.R node kinds: map[CLOSURE:1 EFFECT:3 FUNCTION:1 MEMORY:1 OWNERSHIP:1 STORAGE:1 SYMBOL:2 assign:4 block:4 expression:2 function:5 identifier:4 lvalue:1 parameter:2 program:1 unknown:11]
22```
23
24## Reading this
25
26- `emitted:` blank means the Nim file is **one byte: a newline**. A complete,
27 empty program, written on exit 0.
28- `00-comment.rs` vs `00-comment-fails.rs` differ only by one `//` line.
29- `01-trivial.rs` reports **no error** and produces `call:2 CALL:1` with no
30 function node: `fn f(...)` was read as a call to `f`.
31- The last two lines are the same program in Rust and in R. Only R yields
32 `FUNCTION:1 CLOSURE:1 function:5 parameter:2`.