@@ -46,7 +46,7 @@ use hashql_core::{
4646 r#type:: { TypeId , builder:: IntoSymbol } ,
4747 value:: { Float , Primitive } ,
4848} ;
49- use hashql_hir:: node:: operation:: { BinOp , InputOp , UnOp } ;
49+ use hashql_hir:: node:: operation:: { InputOp , UnOp } ;
5050
5151use crate :: {
5252 body:: {
@@ -57,7 +57,7 @@ use crate::{
5757 local:: { Local , LocalDecl , LocalVec } ,
5858 operand:: Operand ,
5959 place:: { FieldIndex , Place , Projection , ProjectionKind } ,
60- rvalue:: { Aggregate , AggregateKind , Apply , Binary , Input , RValue , Unary } ,
60+ rvalue:: { Aggregate , AggregateKind , Apply , BinOp , Binary , Input , RValue , Unary } ,
6161 statement:: { Assign , Statement , StatementKind } ,
6262 terminator:: { Goto , Return , SwitchInt , SwitchTargets , Target , Terminator , TerminatorKind } ,
6363 } ,
@@ -102,7 +102,7 @@ macro_rules! scaffold {
102102/// Comparison and logical operators are supported:
103103///
104104/// ```
105- /// use hashql_hir::node::operation ::BinOp;
105+ /// use hashql_mir::body::rvalue ::BinOp;
106106/// use hashql_mir::op;
107107///
108108/// // Comparison
@@ -114,8 +114,8 @@ macro_rules! scaffold {
114114/// assert!(matches!(op![>=], BinOp::Gte));
115115///
116116/// // Logical
117- /// assert!(matches!(op![&& ], BinOp::And ));
118- /// assert!(matches!(op![|| ], BinOp::Or ));
117+ /// assert!(matches!(op![&], BinOp::BitAnd ));
118+ /// assert!(matches!(op![|], BinOp::BitOr ));
119119/// ```
120120///
121121/// Arithmetic operators are also available (`op![+]`, `op![-]`, `op![*]`, `op![/]`),
@@ -133,18 +133,18 @@ macro_rules! scaffold {
133133#[ macro_export]
134134macro_rules! op {
135135 // Binary operators
136- [ +] => { hashql_hir :: node :: operation :: BinOp :: Add } ;
137- [ -] => { hashql_hir :: node :: operation :: BinOp :: Sub } ;
138- [ * ] => { hashql_hir :: node :: operation :: BinOp :: Mul } ;
139- [ /] => { hashql_hir :: node :: operation :: BinOp :: Div } ;
140- [ ==] => { hashql_hir :: node :: operation :: BinOp :: Eq } ;
141- [ !=] => { hashql_hir :: node :: operation :: BinOp :: Ne } ;
142- [ <] => { hashql_hir :: node :: operation :: BinOp :: Lt } ;
143- [ <=] => { hashql_hir :: node :: operation :: BinOp :: Lte } ;
144- [ >] => { hashql_hir :: node :: operation :: BinOp :: Gt } ;
145- [ >=] => { hashql_hir :: node :: operation :: BinOp :: Gte } ;
146- [ && ] => { hashql_hir :: node :: operation :: BinOp :: And } ;
147- [ || ] => { hashql_hir :: node :: operation :: BinOp :: Or } ;
136+ [ +] => { $crate :: body :: rvalue :: BinOp :: Add } ;
137+ [ -] => { $crate :: body :: rvalue :: BinOp :: Sub } ;
138+ [ * ] => { $crate :: body :: rvalue :: BinOp :: Mul } ;
139+ [ /] => { $crate :: body :: rvalue :: BinOp :: Div } ;
140+ [ ==] => { $crate :: body :: rvalue :: BinOp :: Eq } ;
141+ [ !=] => { $crate :: body :: rvalue :: BinOp :: Ne } ;
142+ [ <] => { $crate :: body :: rvalue :: BinOp :: Lt } ;
143+ [ <=] => { $crate :: body :: rvalue :: BinOp :: Lte } ;
144+ [ >] => { $crate :: body :: rvalue :: BinOp :: Gt } ;
145+ [ >=] => { $crate :: body :: rvalue :: BinOp :: Gte } ;
146+ [ & ] => { $crate :: body :: rvalue :: BinOp :: BitAnd } ;
147+ [ |] => { $crate :: body :: rvalue :: BinOp :: BitOr } ;
148148
149149 // Unary operators
150150 [ !] => { hashql_hir:: node:: operation:: UnOp :: Not } ;
0 commit comments