MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / precedence

Method precedence

nodedb/src/control/promql/ast.rs:132–141  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

130
131impl BinOp {
132 pub fn precedence(&self) -> u8 {
133 match self {
134 Self::Pow => 6,
135 Self::Mul | Self::Div | Self::Mod => 5,
136 Self::Add | Self::Sub => 4,
137 Self::Eq | Self::Neq | Self::Lt | Self::Gt | Self::Lte | Self::Gte => 3,
138 Self::And | Self::Unless => 2,
139 Self::Or => 1,
140 }
141 }
142
143 pub fn is_comparison(&self) -> bool {
144 matches!(

Callers 1

parse_exprMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected