Skip to main content

unparen

Function unparen 

Source
fn unparen(expr: &Expr) -> &Expr
Expand description

The expression a parenthesised one wraps, however many parentheses were written.

Parentheses group, so they say nothing about the expression inside them: rate((x[5m])) asks for exactly what rate(x[5m]) asks for. Refusing it would reject a statement on the way it was typed rather than on what it means. A range selector is not an expression this compiler compiles on its own, so the call that reads one looks through the grouping itself.