use crate::{
common::ItemId,
sem::{ty::TyKind, ConstValue},
};
#[repr(C)]
#[derive(Debug)]
pub struct BindingArg<'ast> {
binding_target: ItemId,
ty: TyKind<'ast>,
}
impl<'ast> BindingArg<'ast> {
pub fn binding_target(&self) -> ItemId {
self.binding_target
}
pub fn ty(&self) -> TyKind<'ast> {
self.ty
}
}
#[cfg(feature = "driver-api")]
impl<'ast> BindingArg<'ast> {
pub fn new(binding_target: ItemId, ty: TyKind<'ast>) -> Self {
Self { binding_target, ty }
}
}
#[repr(C)]
#[derive(Debug)]
pub struct ConstArg<'ast> {
value: ConstValue<'ast>,
}
impl<'ast> ConstArg<'ast> {
pub fn value(&self) -> &ConstValue<'ast> {
&self.value
}
}
#[cfg(feature = "driver-api")]
impl<'ast> ConstArg<'ast> {
pub fn new(value: ConstValue<'ast>) -> Self {
Self { value }
}
}