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

Function can_bind_left

prqlc/prqlc/src/codegen/ast.rs:306–314  ·  view source on GitHub ↗

True if this expression could be mistakenly bound with an expression on the left.

(expr: &pr::ExprKind)

Source from the content-addressed store, hash-verified

304
305/// True if this expression could be mistakenly bound with an expression on the left.
306fn can_bind_left(expr: &pr::ExprKind) -> bool {
307 matches!(
308 expr,
309 pr::ExprKind::Unary(pr::UnaryExpr {
310 op: pr::UnOp::EqSelf | pr::UnOp::Add | pr::UnOp::Neg,
311 ..
312 })
313 )
314}
315
316impl WriteSource for pr::Ident {
317 fn write(&self, mut opt: WriteOpt) -> Option<String> {

Callers 1

needs_parenthesisFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected