@@ -21,14 +21,14 @@ use crate::{
21
21
pub fn translate_expr ( ctx : & mut TranslateCtx , expr : & Expr ) -> Result < ast:: Expr , ParseError > {
22
22
Ok ( match & expr. kind {
23
23
ExprKind :: Integer ( integer) => translate_expr_integer ( integer, expr. source ) ?,
24
- ExprKind :: Float ( _, _) => todo ! ( ) ,
24
+ ExprKind :: Float ( _, _) => todo ! ( "translate_expr float" ) ,
25
25
ExprKind :: StringLiteral ( encoding, content) => {
26
26
translate_expr_string ( encoding, content, expr. source ) ?
27
27
}
28
28
ExprKind :: Bool ( x) => ast:: ExprKind :: Boolean ( * x) . at ( expr. source ) ,
29
- ExprKind :: Nullptr => todo ! ( ) ,
30
- ExprKind :: Character ( _, _) => todo ! ( ) ,
31
- ExprKind :: Compound ( _) => todo ! ( ) ,
29
+ ExprKind :: Nullptr => todo ! ( "translate_expr nullptr" ) ,
30
+ ExprKind :: Character ( _, _) => todo ! ( "translate_expr character" ) ,
31
+ ExprKind :: Compound ( _) => todo ! ( "translate_expr compound" ) ,
32
32
ExprKind :: BinaryOperation ( operation) => {
33
33
let left = translate_expr ( ctx, & operation. left ) ?;
34
34
let right = translate_expr ( ctx, & operation. right ) ?;
@@ -55,17 +55,17 @@ pub fn translate_expr(ctx: &mut TranslateCtx, expr: &Expr) -> Result<ast::Expr,
55
55
BinaryOperator :: Multiply => ast:: BasicBinaryOperator :: Multiply . into ( ) ,
56
56
BinaryOperator :: Divide => ast:: BasicBinaryOperator :: Divide . into ( ) ,
57
57
BinaryOperator :: Modulus => ast:: BasicBinaryOperator :: Modulus . into ( ) ,
58
- BinaryOperator :: Assign => todo ! ( ) ,
59
- BinaryOperator :: AddAssign => todo ! ( ) ,
60
- BinaryOperator :: SubtractAssign => todo ! ( ) ,
61
- BinaryOperator :: MultiplyAssign => todo ! ( ) ,
62
- BinaryOperator :: DivideAssign => todo ! ( ) ,
63
- BinaryOperator :: ModulusAssign => todo ! ( ) ,
64
- BinaryOperator :: LeftShiftAssign => todo ! ( ) ,
65
- BinaryOperator :: RightShiftAssign => todo ! ( ) ,
66
- BinaryOperator :: BitAndAssign => todo ! ( ) ,
67
- BinaryOperator :: BitXorAssign => todo ! ( ) ,
68
- BinaryOperator :: BitOrAssign => todo ! ( ) ,
58
+ BinaryOperator :: Assign => todo ! ( "translate_expr assign" ) ,
59
+ BinaryOperator :: AddAssign => todo ! ( "translate_expr add assign" ) ,
60
+ BinaryOperator :: SubtractAssign => todo ! ( "translate_expr subtract assign" ) ,
61
+ BinaryOperator :: MultiplyAssign => todo ! ( "translate_expr multiply assign" ) ,
62
+ BinaryOperator :: DivideAssign => todo ! ( "translate_expr divide assign" ) ,
63
+ BinaryOperator :: ModulusAssign => todo ! ( "translate_expr modulus assign" ) ,
64
+ BinaryOperator :: LeftShiftAssign => todo ! ( "translate_expr left shift assign" ) ,
65
+ BinaryOperator :: RightShiftAssign => todo ! ( "translate_expr right shift assign" ) ,
66
+ BinaryOperator :: BitAndAssign => todo ! ( "translate_expr bitwise-and assign" ) ,
67
+ BinaryOperator :: BitXorAssign => todo ! ( "translate_expr bitwise-xor assign" ) ,
68
+ BinaryOperator :: BitOrAssign => todo ! ( "translate_expr bitwise-ox assign" ) ,
69
69
} ;
70
70
71
71
match operator {
@@ -93,6 +93,8 @@ pub fn translate_expr(ctx: &mut TranslateCtx, expr: &Expr) -> Result<ast::Expr,
93
93
ExprKind :: Cast ( _) => todo ! ( ) ,
94
94
ExprKind :: Subscript ( _) => todo ! ( ) ,
95
95
ExprKind :: Field ( _) => todo ! ( ) ,
96
+ ExprKind :: PreIncrement ( _) => todo ! ( ) ,
97
+ ExprKind :: PreDecrement ( _) => todo ! ( ) ,
96
98
ExprKind :: PostIncrement ( _) => todo ! ( ) ,
97
99
ExprKind :: PostDecrement ( _) => todo ! ( ) ,
98
100
ExprKind :: Identifier ( name) => {
@@ -165,6 +167,7 @@ pub fn translate_expr(ctx: &mut TranslateCtx, expr: &Expr) -> Result<ast::Expr,
165
167
ExprKind :: SizeOfValue ( value) => {
166
168
ast:: ExprKind :: SizeOfValue ( Box :: new ( translate_expr ( ctx, value) ?) ) . at ( expr. source )
167
169
}
170
+ ExprKind :: AlignOf ( _) => todo ! ( "translate_expr AlignOf" ) ,
168
171
ExprKind :: IntegerPromote ( value) => {
169
172
ast:: ExprKind :: IntegerPromote ( Box :: new ( translate_expr ( ctx, value) ?) ) . at ( expr. source )
170
173
}
0 commit comments