INNER CODE UNIT · Rust
render
apache/datafusion-sqlparser-rs · fuzz/fuzz_targets/expression/mod.rs:50
pub fn render(&self, grammar: &Grammar) -> String {
pick(grammar.contexts, self.context).replacen("{}", &self.chain.render(grammar), 1)
}
}
/// An expression written as operands joined by operators, with no parentheses unless the input asks for a group.
#[derive(Arbitrary, Debug)]
pub struct Chain {
first: Operand,
rest: Vec<(Infix, Operand)>,
}
#[derive(Arbitrary, Debug)]
struct Infix {
op: u8,
tight: bool,
}