@@ -131,6 +131,12 @@ protected override Expression VisitBinary(BinaryExpression node)
131131
132132 protected override Expression VisitConstant ( ConstantExpression node )
133133 {
134+ if ( node . Value is Enum && node . Type . IsEnum )
135+ {
136+ Output . Append ( node . Type . Name ) . Append ( "." ) . Append ( node . Value . ToString ( ) ) ;
137+ return node ;
138+ }
139+
134140 string str = node . Value switch
135141 {
136142 char x => map . ToValueLabel ( x ) ,
@@ -168,6 +174,13 @@ protected override Expression VisitUnary(UnaryExpression node)
168174 return node ;
169175 }
170176
177+ if ( node . NodeType == ExpressionType . Not )
178+ {
179+ Output . Append ( "!" ) ;
180+ Visit ( node . Operand ) ;
181+ return node ;
182+ }
183+
171184 Visit ( node . Operand ) ;
172185 switch ( node . NodeType )
173186 {
@@ -250,6 +263,14 @@ protected override Expression VisitGoto(GotoExpression node)
250263 ExpressionType . LeftShift => " << " ,
251264 ExpressionType . RightShift => " >> " ,
252265 ExpressionType . Or => " | " ,
266+ ExpressionType . And => " & " ,
267+ ExpressionType . AndAlso => " && " ,
268+ ExpressionType . OrElse => " || " ,
269+ ExpressionType . Modulo => " % " ,
270+ ExpressionType . Equal => " == " ,
271+ ExpressionType . NotEqual => " != " ,
272+ ExpressionType . LessThan => " < " ,
273+ ExpressionType . LessThanOrEqual => " <= " ,
253274 ExpressionType . GreaterThan => " > " ,
254275 ExpressionType . GreaterThanOrEqual => " >= " ,
255276 ExpressionType . AddAssign => " += " ,
0 commit comments