Skip to main content

Module operator

Module operator 

Source
Expand description

Binary-operator vocabulary.

BinOp is the syntactic binary-operator enum the query AST emits and the coercion spine keys overload resolution on. It is coercion vocabulary as much as it is parser vocabulary: the spine (coercion_spine::resolve_binop) cannot resolve an operator overload without it, and that spine lives in this keystone crate (ADR 0052).

Re-homing only the spine while leaving BinOp in the server would force this crate to depend back on reddb-server — the exact cycle ADR 0052 exists to prevent. So the operator vocabulary moves here and the query AST (reddb-server’s storage::query::ast) re-exports it, keeping every existing ast::BinOp call-site untouched.

The move is byte-faithful: the enum, its variant set, and the precedence() table are relocated verbatim from storage::query::ast.

Enums§

BinOp
Syntactic binary operators. Parsed precedence determines grouping; this enum only identifies the operator itself. Comparison and logical operators live alongside arithmetic so a single Expr::BinaryOp walker can cover every infix form the parser emits.