[][src]Struct open_vaf::ast_lowering::BranchResolver

pub struct BranchResolver { /* fields omitted */ }

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]

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 of V(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]

pub fn resolve_branch_access(
    &mut self,
    fold: &mut Fold<'lt>,
    branch_access: &Node<BranchAccess>
) -> Option<(BranchId, DisciplineId)>
[src]

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]

Resolves a branch such as (NET1,NET2) or ()

Arguments

  • fold - The calling fold which is used for name resolution and error handling

  • branch - An Ast node describing a branch

Returns

The Id of the resolved branch and its Discipline (if the resolution succeeded)

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.