luaur_vm/macros/vm_dispatch_op.rs
1#[allow(non_snake_case)]
2#[macro_export]
3macro_rules! VM_DISPATCH_OP {
4 ($op:ident) => {
5 // In C++, this expands to &&CASE_##op (a GCC/Clang label address).
6 // In Rust, we use match arms or a similar dispatch mechanism.
7 // To avoid "unknown prefix" errors in Rust 2021+, we use concat_idents-like behavior
8 // or simply rely on the downstream match arm naming convention.
9 // Since Rust doesn't have a stable concat_idents!, we emit the identifier directly
10 // via a token-pasting-friendly pattern if needed, but for Luau VM dispatch,
11 // this usually refers to a variant or a label in a manual dispatch table.
12 $op
13 };
14}
15
16pub use VM_DISPATCH_OP;