[−][src]Struct open_vaf::ast_lowering::BranchResolver
Handles branch resolution which is more complicated because unnamed branches exist and discipline comparability has to be enforced
Safety
Branch resolution may only take place after all nets and ports have been folded! UB might occur otherwise.
Implementations
impl<'lt> BranchResolver
[src]
pub fn new(ast: &'lt Ast) -> Self
[src]
pub fn resolve_discipline_access(
&mut self,
fold: &mut Fold<'lt>,
nature_name: &Ident,
discipline: DisciplineId
) -> Option<DisciplineAccess>
[src]
&mut self,
fold: &mut Fold<'lt>,
nature_name: &Ident,
discipline: DisciplineId
) -> Option<DisciplineAccess>
Resolves a DisciplineAccess (for example V(b)
or V(x,y)
)
Arguments
-
fold - The calling fold which is used for name resolution and error handling
-
nature_name - The identifier of the nature (for example
V
in the case ofV(X,Y)
) -
discipline - The id of the Discipline of a BranchAccess ( that has been resolved using
resolve_branch_access
Safety
This is only save to call
pub fn resolve_nature_access(
fold: &mut Fold<'lt>,
id: NatureId,
discipline: DisciplineId
) -> Option<DisciplineAccess>
[src]
fold: &mut Fold<'lt>,
id: NatureId,
discipline: DisciplineId
) -> Option<DisciplineAccess>
pub fn resolve_branch_access(
&mut self,
fold: &mut Fold<'lt>,
branch_access: &Node<BranchAccess>
) -> Option<(BranchId, DisciplineId)>
[src]
&mut self,
fold: &mut Fold<'lt>,
branch_access: &Node<BranchAccess>
) -> Option<(BranchId, DisciplineId)>
Resolves a branch access such as (NET1,NET2)
,(<PORT>)
or (BRANCH)
Arguments
-
fold - The calling fold which is used for name resolution and error handling
-
branch_access - A reference to an Ast node for a branch access call
Returns
The Id of the resolved branch and its Discipline (if the resolution succeeded)
pub fn resolve_branch(
&mut self,
fold: &mut Fold<'lt>,
branch: &Branch
) -> Option<(Branch, DisciplineId)>
[src]
&mut self,
fold: &mut Fold<'lt>,
branch: &Branch
) -> Option<(Branch, DisciplineId)>
Auto Trait Implementations
impl RefUnwindSafe for BranchResolver
impl Send for BranchResolver
impl Sync for BranchResolver
impl Unpin for BranchResolver
impl UnwindSafe for BranchResolver
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,