1
0
forked from M-Labs/nac3
lyken 572ae116ec core/object: introduce object
A small abstraction to simplify implementations.
2024-10-18 14:21:26 +08:00

13 lines
309 B
Rust

use inkwell::values::BasicValueEnum;
use crate::typecheck::typedef::Type;
/// A NAC3 LLVM Python object of any type.
#[derive(Debug, Clone, Copy)]
pub struct AnyObject<'ctx> {
/// Typechecker type of the object.
pub ty: Type,
/// LLVM value of the object.
pub value: BasicValueEnum<'ctx>,
}