(w: &mut W, tokens: &lr::Tokens)
| 256 | } |
| 257 | |
| 258 | fn write_repr_lr<W: Write>(w: &mut W, tokens: &lr::Tokens) -> Result { |
| 259 | writeln!(w, r#"<table class="lr repr">"#)?; |
| 260 | |
| 261 | for token in &tokens.0 { |
| 262 | writeln!(w, r#"<tr class="token">"#,)?; |
| 263 | writeln!(w, "<td>{}</td>", escape_html(&format!("{:?}", token.kind)))?; |
| 264 | writeln!( |
| 265 | w, |
| 266 | r#"<td><span class="span">{}:{}</span></td>"#, |
| 267 | token.span.start, token.span.end |
| 268 | )?; |
| 269 | writeln!(w, "</tr>")?; |
| 270 | } |
| 271 | |
| 272 | writeln!(w, "</table>") |
| 273 | } |
| 274 | |
| 275 | fn write_repr_pr<W: Write>(w: &mut W, ast: &pr::ModuleDef) -> Result { |
| 276 | writeln!(w, r#"<div class="pr repr">"#)?; |
no outgoing calls
no test coverage detected