forked from M-Labs/nac3
core/object: introduce object
Small abstraction to simplify implementations.
This commit is contained in:
parent
ff84c9bfaf
commit
b6aae87bd3
|
@ -43,6 +43,7 @@ pub mod irrt;
|
|||
pub mod llvm_intrinsics;
|
||||
pub mod model;
|
||||
pub mod numpy;
|
||||
pub mod object;
|
||||
pub mod stmt;
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
use inkwell::values::BasicValueEnum;
|
||||
|
||||
use crate::typecheck::typedef::Type;
|
||||
|
||||
/// An NAC3 LLVM Python object.
|
||||
#[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>,
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
pub mod any;
|
Loading…
Reference in New Issue