mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-04-20 03:03:25 -04:00
Fixes #1493 Allow passing machines as argument when instantiating submachines, as in: ``` use std::machines::binary::Binary; machine Main with degree: 262144 { reg pc[@pc]; reg X[<=]; reg Y[<=]; reg Z[<=]; reg A; Binary binary; WithArg sub(binary); instr and X, Y -> Z ~ binary.and; instr or X, Y -> Z ~ binary.or; instr xor X, Y -> Z ~ binary.xor; ... } machine WithArg(bin: Binary) { reg pc[@pc]; reg X[<=]; reg Y[<=]; reg Z[<=]; reg A; reg B; instr and X, Y -> Z ~ bin.and; instr or X, Y -> Z ~ bin.or; instr xor X, Y -> Z ~ bin.xor; ... } ```