@@ -52,8 +52,8 @@ impl Visitor for PrintVisitor {
52
52
ast:: Expression :: Unary { op, .. } => {
53
53
self . print ( & format ! ( "{:?}" , op) ) ;
54
54
}
55
- ast:: Expression :: Ref { comp } => {
56
- self . print ( & format ! ( "{:?}" , comp ) ) ;
55
+ ast:: Expression :: Ref { .. } => {
56
+ self . print ( "ref" ) ;
57
57
}
58
58
ast:: Expression :: UnsignedInteger ( val) => {
59
59
self . print ( & format ! ( "{:?}" , val) ) ;
@@ -70,8 +70,8 @@ impl Visitor for PrintVisitor {
70
70
ast:: Expression :: ArrayArguments { .. } => {
71
71
self . print ( "array_args" ) ;
72
72
}
73
- ast:: Expression :: FunctionCall { comp , .. } => {
74
- self . print ( & format ! ( "{:?}" , comp ) ) ;
73
+ ast:: Expression :: FunctionCall { .. } => {
74
+ self . print ( "function call" ) ;
75
75
}
76
76
ast:: Expression :: Der { .. } => {
77
77
self . print ( "der" ) ;
@@ -108,4 +108,15 @@ impl Visitor for PrintVisitor {
108
108
ast:: Element :: ExtendsClause { .. } => { }
109
109
}
110
110
}
111
+
112
+ fn exit_component_reference ( & mut self , comp : & ast:: ComponentReference ) {
113
+ let mut s: String = "" . to_string ( ) ;
114
+ for ( index, part) in comp. parts . iter ( ) . enumerate ( ) {
115
+ if index != 0 || comp. local {
116
+ s += "." ;
117
+ }
118
+ s += & part. name ;
119
+ }
120
+ self . print ( & s) ;
121
+ }
111
122
}
0 commit comments