| Scaffold rustnim: Rust->Nim transpiler, type mapping 1a218c2 nandi 19h ago | 1 | # Expected output of ./repro.sh |
| 2 | |
| 3 | Recorded 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) === |
| 7 | 00-comment-fails.rs exit=0 <no error> emitted: |
| 8 | 00-comment.rs exit=0 <no error> emitted: |
| 9 | 01-trivial.rs exit=0 <no error> emitted: |
| 10 | 02-if-block.rs exit=0 <no error> emitted: |
| 11 | 03-macro.rs exit=0 <no error> emitted: |
| 12 | 04-lifetime.rs exit=1 r2many: unmatched delimiter ")" at 47 |
| 13 | |
| 14 | === Frontend prober: UAST node kinds actually produced === |
| 15 | 00-comment-fails.rs err: expected expression near "/" |
| 16 | 00-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] |
| 17 | 01-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] |
| 18 | 02-if-block.rs err: expected "" near "s" |
| 19 | 03-macro.rs err: expected "" near "," |
| 20 | 04-lifetime.rs err: expected expression near ")" |
| 21 | 05-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`. |