@@ -30,21 +30,21 @@ impl Visitor for PrintVisitor {
30
30
self . level -= 1 ;
31
31
}
32
32
33
- fn enter_stored_definition ( & mut self , _node : & mut ast:: StoredDefinition ) {
33
+ fn enter_stored_definition ( & mut self , _node : & ast:: StoredDefinition ) {
34
34
self . print ( "Stored definition" ) ;
35
35
}
36
36
37
- fn enter_class_definition ( & mut self , node : & mut ast:: ClassDefinition ) {
37
+ fn enter_class_definition ( & mut self , node : & ast:: ClassDefinition ) {
38
38
if let ast:: ClassSpecifier :: Long { name, .. } = & node. specifier {
39
39
self . print ( & format ! ( "class {}" , name) ) ;
40
40
}
41
41
}
42
42
43
- fn exit_class_definition ( & mut self , _node : & mut ast:: ClassDefinition ) {
43
+ fn exit_class_definition ( & mut self , _node : & ast:: ClassDefinition ) {
44
44
println ! ( "\n " ) ;
45
45
}
46
46
47
- fn enter_expression ( & mut self , node : & mut ast:: Expression ) {
47
+ fn enter_expression ( & mut self , node : & ast:: Expression ) {
48
48
match node {
49
49
ast:: Expression :: Binary { op, .. } => {
50
50
self . print ( & format ! ( "{:?}" , op) ) ;
@@ -80,7 +80,7 @@ impl Visitor for PrintVisitor {
80
80
}
81
81
}
82
82
83
- fn enter_equation ( & mut self , node : & mut ast:: Equation ) {
83
+ fn enter_equation ( & mut self , node : & ast:: Equation ) {
84
84
match node {
85
85
ast:: Equation :: Connect { .. } => {
86
86
self . print ( "connect" ) ;
@@ -96,11 +96,11 @@ impl Visitor for PrintVisitor {
96
96
}
97
97
}
98
98
99
- fn enter_component_declaration ( & mut self , node : & mut ast:: ComponentDeclaration ) {
99
+ fn enter_component_declaration ( & mut self , node : & ast:: ComponentDeclaration ) {
100
100
self . print ( & format ! ( "component: {}" , node. declaration. name) ) ;
101
101
}
102
102
103
- fn exit_component_reference ( & mut self , node : & mut ast:: ComponentReference ) {
103
+ fn exit_component_reference ( & mut self , node : & ast:: ComponentReference ) {
104
104
let mut s: String = "" . to_string ( ) ;
105
105
for ( index, part) in node. parts . iter ( ) . enumerate ( ) {
106
106
if index != 0 || node. local {
0 commit comments