MCPcopy Create free account
hub / github.com/PRQL/prql / write_repr_pl

Function write_repr_pl

prqlc/prqlc/src/debug/render_html.rs:285–293  ·  view source on GitHub ↗
(w: &mut W, ast: &pl::ModuleDef)

Source from the content-addressed store, hash-verified

283}
284
285fn write_repr_pl<W: Write>(w: &mut W, ast: &pl::ModuleDef) -> Result {
286 writeln!(w, r#"<div class="pl repr">"#)?;
287
288 let json = serde_json::to_string(ast).unwrap();
289 let json_node: serde_json::Value = serde_json::from_str(&json).unwrap();
290 write_json_ast_node(w, json_node, false)?;
291
292 writeln!(w, "</div>")
293}
294
295fn write_repr_decl<W: Write>(w: &mut W, root_mod: &decl::RootModule) -> Result {
296 writeln!(w, r#"<div class="decl repr">"#)?;

Callers 1

write_titled_entryFunction · 0.85

Calls 1

write_json_ast_nodeFunction · 0.85

Tested by

no test coverage detected