comparison src/ast_dump.rs @ 28:bc3437ecb12b

Add a test for unaryop and fix ast_dump for unaryop::Not.
author Bastien Orivel <eijebong@bananium.fr>
date Fri, 03 Jun 2016 23:59:41 +0200
parents 25b202005d1d
children e244c492ff07
comparison
equal deleted inserted replaced
27:4c926e910b80 28:bc3437ecb12b
33 33
34 impl unaryop { 34 impl unaryop {
35 fn to_string(&self) -> &'static str { 35 fn to_string(&self) -> &'static str {
36 match *self { 36 match *self {
37 unaryop::Invert => "~", 37 unaryop::Invert => "~",
38 unaryop::Not => "!", 38 unaryop::Not => "not ",
39 unaryop::UAdd => "+", 39 unaryop::UAdd => "+",
40 unaryop::USub => "-" 40 unaryop::USub => "-"
41 } 41 }
42 } 42 }
43 } 43 }