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

Function write_within

prqlc/prqlc/src/codegen/ast.rs:15–24  ·  view source on GitHub ↗
(
    node: &T,
    parent: &pr::ExprKind,
    mut opt: WriteOpt,
)

Source from the content-addressed store, hash-verified

13}
14
15fn write_within<T: WriteSource>(
16 node: &T,
17 parent: &pr::ExprKind,
18 mut opt: WriteOpt,
19) -> Option<String> {
20 let parent_strength = binding_strength(parent);
21 opt.context_strength = opt.context_strength.max(parent_strength);
22
23 node.write(opt)
24}
25
26impl WriteSource for pr::Expr {
27 fn write(&self, mut opt: WriteOpt) -> Option<String> {

Callers 1

writeMethod · 0.85

Calls 2

binding_strengthFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected