pub fn ty<I>(&self, id: I) -> Result<&'ctx Ty>
    where
        I: 'ctx + Copy + Debug + Into<NodeId>,
        ScoreContext<'lazy, 'sb, 'ast, 'ctx>: NodeMaker<I, &'ctx Ty>,
    {
        if let Some(node) = self.sb.ty_table.borrow().get(&id.into()).cloned() {
            return Ok(node);
        }
        if let Some(&node) = self.sb.typeval_table.borrow().get(&id.into()) {
            return node;
        }
        if self.sess.opts.trace_scoreboard {
            debugln!("[SB][VHDL] make ty for {:?}", id);
        }
        let node = self.make(id)?;
        if self.sess.opts.trace_scoreboard {
            debugln!("[SB][VHDL] ty for {:?} is {:?}", id, node);
        }
        if self
            .sb
            .ty_table
            .borrow_mut()
            .insert(id.into(), node)
            .is_some()
        {
            self.emit(DiagBuilder2::bug(format!(
                "type for {:?} already in the scoreboard",
                id
            )));
            return Err(());
        }
        Ok(node)
    }
/// Determine the type of a node.
///
/// If called for the first time with the given `id`, calculates the type by
/// calling `self.make(id)`. Otherwise returns the existing information.
Determine the type of a node.
If called for the first time with the given `id`, calculates the type by
calling `self.make(id)`. Otherwise returns the existing information.
Determine the type of a node . If called for the first time with the given ` id ` calculates the type by calling ` self . make ( id ) ` . Otherwise returns the existing information .
pub fn ty<I>(&self, id: I) -> Result<&'ctx Ty>
    where
        I: 'ctx + Copy + Debug + Into<NodeId>,
        ScoreContext<'lazy, 'sb, 'ast, 'ctx>: NodeMaker<I, &'ctx Ty>,
    {
        if let Some(node) = self.sb.ty_table.borrow().get(&id.into()).cloned() {
            return Ok(node);
        }
        if let Some(&node) = self.sb.typeval_table.borrow().get(&id.into()) {
            return node;
        }
        if self.sess.opts.trace_scoreboard {
            debugln!("[SB][VHDL] make ty for {:?}", id);
        }
        let node = self.make(id)?;
        if self.sess.opts.trace_scoreboard {
            debugln!("[SB][VHDL] ty for {:?} is {:?}", id, node);
        }
        if self
            .sb
            .ty_table
            .borrow_mut()
            .insert(id.into(), node)
            .is_some()
        {
            self.emit(DiagBuilder2::bug(format!(
                "type for {:?} already in the scoreboard",
                id
            )));
            return Err(());
        }
        Ok(node)
    }
pub fn ty < I > ( & self , id : I ) -> Result < & ' ctx Ty > where I : ' ctx + Copy + Debug + Into < NodeId > , ScoreContext < ' lazy , ' sb , ' ast , ' ctx > : NodeMaker < I , & ' ctx Ty > , { if let Some ( node ) = self . sb . ty_table . borrow ( ) . get ( & id . into ( ) ) . cloned ( ) { return Ok ( node ) ; } if let Some ( & node ) = self . sb . typeval_table . borrow ( ) . get ( & id . into ( ) ) { return node ; } if self . sess . opts . trace_scoreboard { debugln ! ( " " id ) ; } let node = self . make ( id ) ? ; if self . sess . opts . trace_scoreboard { debugln ! ( " " id node ) ; } if self . sb . ty_table . borrow_mut ( ) . insert ( id . into ( ) , node ) . is_some ( ) { self . emit ( DiagBuilder2 :: bug ( format ! ( " " id ) ) ) ; return Err ( ( ) ) ; } Ok ( node ) }
Determine the type of a node.
Determine the type of a node .
&self
id
I
&self
id
I