INNER CODE UNIT · Rust
IRSB
c3rb3ru5d3d53c/binlex · crates/libvex/libvex-macros/src/lib.rs:602
pub fn IRSB(item: TokenStream) -> TokenStream {
let irsb = parse_macro_input!(item as IRSB);
let (ip_offset, next, stmts) = match irsb.stmts.split_last() {
Some((Stmt::Put(StmtPut { offset, data, .. }), stmts)) => (offset, data, stmts),
Some(_) => {
return quote!(compile_error!(
"The last statement is not a valid 'next' statement (PUT(ip_offset) = Expr)"
))
.into();
}
None => {
return quote!(compile_error!(
"No statements found! (There must be at least the 'next' statement.)"
))
.into();
}
};