High-level Intermediate Representation for C-to-Rust transpilation.
The HIR is a Rust-oriented representation that bridges C AST and Rust code generation.
Examples
use ;
// Create a simple HIR function
let func = new;
assert_eq!;
assert_eq!;
High-level Intermediate Representation for C-to-Rust transpilation.
The HIR is a Rust-oriented representation that bridges C AST and Rust code generation.
use decy_hir::{HirFunction, HirType, HirParameter};
// Create a simple HIR function
let func = HirFunction::new(
"main".to_string(),
HirType::Int,
vec![],
);
assert_eq!(func.name(), "main");
assert_eq!(func.return_type(), &HirType::Int);