fn push_annotation(&mut self, ann: &'b Annot) -> io::Result<()> {
    macro_rules! tag {
      (span $cls:expr) => {tag!("span", concat!(" class=\"", $cls, "\""))};
      ($tag:expr, $attr:expr) => {{
        write!(self.w.0, concat!("<", $tag, $attr, ">"))?;
        self.stack.push($tag);
      }};
    }
    match *ann {
      Annot::SortModifiers(_) => tag!(span "sortmod"),
      Annot::Visibility(_) => tag!(span "vis"),
      Annot::Keyword => tag!(span "kw"),
      Annot::SortName(sid) => {
        write!(self.w.0, "<a class=\"sortname\" href=\"{}index.html#", self.rel)?;
        let ad = &self.env.data[self.env.sorts[sid].atom];
        disambiguated_anchor(&mut self.w.0, ad, false)?;
        write!(self.w.0, "\">")?;
        self.stack.push("a");
      }
      Annot::TermName(tid) => {
        let kind = match &self.env.terms[tid].kind {
          crate::elab::environment::TermKind::Term => "term",
          crate::elab::environment::TermKind::Def(_) => "def"
        };
        write!(self.w.0, "<a class=\"{}\" href=\"{}index.html#", kind, self.rel)?;
        let ad = &self.env.data[self.env.terms[tid].atom];
        disambiguated_anchor(&mut self.w.0, ad, false)?;
        write!(self.w.0, "\">")?;
        self.stack.push("a");
      }
      Annot::ThmName(tid) => {
        let w = &mut *self.w.0;
        let rel = self.rel;
        let kind = match &self.env.thms[tid].kind {
          ThmKind::Axiom => "ax",
          ThmKind::Thm(_) => "thm"
        };
        self.mangler.mangle(self.env, tid, |_, mangled|
          write!(w, r#"<a class="{}" href="{}thms/{}.html">"#, kind, rel, mangled))?;
        self.stack.push("a");
      }
    }
    Ok(())
  }
/// Push the close annotation's close tag to the stack for later
/// and write the open tag representation to the underlying writer
Push the close annotation's close tag to the stack for later
and write the open tag representation to the underlying writer
Push the close annotation ' s close tag to the stack for later and write the open tag representation to the underlying writer
fn push_annotation(&mut self, ann: &'b Annot) -> io::Result<()> {
    macro_rules! tag {
      (span $cls:expr) => {tag!("span", concat!(" class=\"", $cls, "\""))};
      ($tag:expr, $attr:expr) => {{
        write!(self.w.0, concat!("<", $tag, $attr, ">"))?;
        self.stack.push($tag);
      }};
    }
    match *ann {
      Annot::SortModifiers(_) => tag!(span "sortmod"),
      Annot::Visibility(_) => tag!(span "vis"),
      Annot::Keyword => tag!(span "kw"),
      Annot::SortName(sid) => {
        write!(self.w.0, "<a class=\"sortname\" href=\"{}index.html#", self.rel)?;
        let ad = &self.env.data[self.env.sorts[sid].atom];
        disambiguated_anchor(&mut self.w.0, ad, false)?;
        write!(self.w.0, "\">")?;
        self.stack.push("a");
      }
      Annot::TermName(tid) => {
        let kind = match &self.env.terms[tid].kind {
          crate::elab::environment::TermKind::Term => "term",
          crate::elab::environment::TermKind::Def(_) => "def"
        };
        write!(self.w.0, "<a class=\"{}\" href=\"{}index.html#", kind, self.rel)?;
        let ad = &self.env.data[self.env.terms[tid].atom];
        disambiguated_anchor(&mut self.w.0, ad, false)?;
        write!(self.w.0, "\">")?;
        self.stack.push("a");
      }
      Annot::ThmName(tid) => {
        let w = &mut *self.w.0;
        let rel = self.rel;
        let kind = match &self.env.thms[tid].kind {
          ThmKind::Axiom => "ax",
          ThmKind::Thm(_) => "thm"
        };
        self.mangler.mangle(self.env, tid, |_, mangled|
          write!(w, r#"<a class="{}" href="{}thms/{}.html">"#, kind, rel, mangled))?;
        self.stack.push("a");
      }
    }
    Ok(())
  }
fn push_annotation ( & mut self , ann : & ' b Annot ) -> io :: Result < ( ) > { macro_rules! tag { ( span $cls : expr ) => { tag ( " " concat ( " \" " $cls " \" " ) ) } ; ( $tag : expr $attr : expr ) => { { write ( self w 0 concat ( " " $tag $attr " " ) ) self stack push ( $tag ) } } ; } match * ann { Annot :: SortModifiers ( _ ) => tag ! ( span " " ) , Annot :: Visibility ( _ ) => tag ! ( span " " ) , Annot :: Keyword => tag ! ( span " " ) , Annot :: SortName ( sid ) => { write ! ( self w 0 " \" \" \" " self rel ) ? ; let ad = & self . env . data [ self . env . sorts [ sid ] . atom ] ; disambiguated_anchor ( & mut self . w . 0 , ad , false ) ? ; write ! ( self w 0 " \" " ) ? ; self . stack . push ( " " ) ; } Annot :: TermName ( tid ) => { let kind = match & self . env . terms [ tid ] . kind { crate :: elab :: environment :: TermKind :: Term => " " , crate :: elab :: environment :: TermKind :: Def ( _ ) => " " } ; write ! ( self w 0 " \" \" \" " kind self rel ) ? ; let ad = & self . env . data [ self . env . terms [ tid ] . atom ] ; disambiguated_anchor ( & mut self . w . 0 , ad , false ) ? ; write ! ( self w 0 " \" " ) ? ; self . stack . push ( " " ) ; } Annot :: ThmName ( tid ) => { let w = & mut * self . w . 0 ; let rel = self . rel ; let kind = match & self . env . thms [ tid ] . kind { ThmKind :: Axiom => " " , ThmKind :: Thm ( _ ) => " " } ; self . mangler . mangle ( self . env , tid , | _ , mangled | write ! ( w r#"<a class="{}" href="{}thms/{}.html">"# kind rel mangled ) ) ? ; self . stack . push ( " " ) ; } } Ok ( ( ) ) }
Push the close annotation's close tag to the stack for later
and write the open tag representation to the underlying writer
Push the close annotation ' s close tag to the stack for later and write the open tag representation to the underlying writer
&mut self
ann
&'b Annot
&mut self
ann
&'b Annot