Changes in src/SynTree/Visitor.cc [906e24d:b6fe7e6]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Visitor.cc
r906e24d rb6fe7e6 150 150 151 151 void Visitor::visit( ApplicationExpr *applicationExpr ) { 152 maybeAccept( applicationExpr->get_result(), *this );152 acceptAll( applicationExpr->get_results(), *this ); 153 153 maybeAccept( applicationExpr->get_function(), *this ); 154 154 acceptAll( applicationExpr->get_args(), *this ); … … 156 156 157 157 void Visitor::visit( UntypedExpr *untypedExpr ) { 158 maybeAccept( untypedExpr->get_result(), *this );158 acceptAll( untypedExpr->get_results(), *this ); 159 159 acceptAll( untypedExpr->get_args(), *this ); 160 160 } 161 161 162 162 void Visitor::visit( NameExpr *nameExpr ) { 163 maybeAccept( nameExpr->get_result(), *this );163 acceptAll( nameExpr->get_results(), *this ); 164 164 } 165 165 166 166 void Visitor::visit( AddressExpr *addressExpr ) { 167 maybeAccept( addressExpr->get_result(), *this );167 acceptAll( addressExpr->get_results(), *this ); 168 168 maybeAccept( addressExpr->get_arg(), *this ); 169 169 } 170 170 171 171 void Visitor::visit( LabelAddressExpr *labAddressExpr ) { 172 maybeAccept( labAddressExpr->get_result(), *this );172 acceptAll( labAddressExpr->get_results(), *this ); 173 173 maybeAccept( labAddressExpr->get_arg(), *this ); 174 174 } 175 175 176 176 void Visitor::visit( CastExpr *castExpr ) { 177 maybeAccept( castExpr->get_result(), *this );177 acceptAll( castExpr->get_results(), *this ); 178 178 maybeAccept( castExpr->get_arg(), *this ); 179 179 } 180 180 181 181 void Visitor::visit( UntypedMemberExpr *memberExpr ) { 182 maybeAccept( memberExpr->get_result(), *this );182 acceptAll( memberExpr->get_results(), *this ); 183 183 maybeAccept( memberExpr->get_aggregate(), *this ); 184 184 } 185 185 186 186 void Visitor::visit( MemberExpr *memberExpr ) { 187 maybeAccept( memberExpr->get_result(), *this );187 acceptAll( memberExpr->get_results(), *this ); 188 188 maybeAccept( memberExpr->get_aggregate(), *this ); 189 189 } 190 190 191 191 void Visitor::visit( VariableExpr *variableExpr ) { 192 maybeAccept( variableExpr->get_result(), *this );192 acceptAll( variableExpr->get_results(), *this ); 193 193 } 194 194 195 195 void Visitor::visit( ConstantExpr *constantExpr ) { 196 maybeAccept( constantExpr->get_result(), *this );196 acceptAll( constantExpr->get_results(), *this ); 197 197 maybeAccept( constantExpr->get_constant(), *this ); 198 198 } 199 199 200 200 void Visitor::visit( SizeofExpr *sizeofExpr ) { 201 maybeAccept( sizeofExpr->get_result(), *this );201 acceptAll( sizeofExpr->get_results(), *this ); 202 202 if ( sizeofExpr->get_isType() ) { 203 203 maybeAccept( sizeofExpr->get_type(), *this ); … … 208 208 209 209 void Visitor::visit( AlignofExpr *alignofExpr ) { 210 maybeAccept( alignofExpr->get_result(), *this );210 acceptAll( alignofExpr->get_results(), *this ); 211 211 if ( alignofExpr->get_isType() ) { 212 212 maybeAccept( alignofExpr->get_type(), *this ); … … 217 217 218 218 void Visitor::visit( UntypedOffsetofExpr *offsetofExpr ) { 219 maybeAccept( offsetofExpr->get_result(), *this );219 acceptAll( offsetofExpr->get_results(), *this ); 220 220 maybeAccept( offsetofExpr->get_type(), *this ); 221 221 } 222 222 223 223 void Visitor::visit( OffsetofExpr *offsetofExpr ) { 224 maybeAccept( offsetofExpr->get_result(), *this );224 acceptAll( offsetofExpr->get_results(), *this ); 225 225 maybeAccept( offsetofExpr->get_type(), *this ); 226 226 maybeAccept( offsetofExpr->get_member(), *this ); … … 228 228 229 229 void Visitor::visit( OffsetPackExpr *offsetPackExpr ) { 230 maybeAccept( offsetPackExpr->get_result(), *this );230 acceptAll( offsetPackExpr->get_results(), *this ); 231 231 maybeAccept( offsetPackExpr->get_type(), *this ); 232 232 } 233 233 234 234 void Visitor::visit( AttrExpr *attrExpr ) { 235 maybeAccept( attrExpr->get_result(), *this );235 acceptAll( attrExpr->get_results(), *this ); 236 236 if ( attrExpr->get_isType() ) { 237 237 maybeAccept( attrExpr->get_type(), *this ); … … 242 242 243 243 void Visitor::visit( LogicalExpr *logicalExpr ) { 244 maybeAccept( logicalExpr->get_result(), *this );244 acceptAll( logicalExpr->get_results(), *this ); 245 245 maybeAccept( logicalExpr->get_arg1(), *this ); 246 246 maybeAccept( logicalExpr->get_arg2(), *this ); … … 248 248 249 249 void Visitor::visit( ConditionalExpr *conditionalExpr ) { 250 maybeAccept( conditionalExpr->get_result(), *this );250 acceptAll( conditionalExpr->get_results(), *this ); 251 251 maybeAccept( conditionalExpr->get_arg1(), *this ); 252 252 maybeAccept( conditionalExpr->get_arg2(), *this ); … … 255 255 256 256 void Visitor::visit( CommaExpr *commaExpr ) { 257 maybeAccept( commaExpr->get_result(), *this );257 acceptAll( commaExpr->get_results(), *this ); 258 258 maybeAccept( commaExpr->get_arg1(), *this ); 259 259 maybeAccept( commaExpr->get_arg2(), *this ); … … 261 261 262 262 void Visitor::visit( TupleExpr *tupleExpr ) { 263 maybeAccept( tupleExpr->get_result(), *this );263 acceptAll( tupleExpr->get_results(), *this ); 264 264 acceptAll( tupleExpr->get_exprs(), *this ); 265 265 } 266 266 267 267 void Visitor::visit( SolvedTupleExpr *tupleExpr ) { 268 maybeAccept( tupleExpr->get_result(), *this );268 acceptAll( tupleExpr->get_results(), *this ); 269 269 acceptAll( tupleExpr->get_exprs(), *this ); 270 270 } 271 271 272 272 void Visitor::visit( TypeExpr *typeExpr ) { 273 maybeAccept( typeExpr->get_result(), *this );273 acceptAll( typeExpr->get_results(), *this ); 274 274 maybeAccept( typeExpr->get_type(), *this ); 275 275 } … … 288 288 289 289 void Visitor::visit( ConstructorExpr * ctorExpr ) { 290 maybeAccept( ctorExpr->get_result(), *this );290 acceptAll( ctorExpr->get_results(), *this ); 291 291 maybeAccept( ctorExpr->get_callExpr(), *this ); 292 292 } 293 293 294 294 void Visitor::visit( CompoundLiteralExpr *compLitExpr ) { 295 maybeAccept( compLitExpr->get_result(), *this );295 acceptAll( compLitExpr->get_results(), *this ); 296 296 maybeAccept( compLitExpr->get_type(), *this ); 297 297 maybeAccept( compLitExpr->get_initializer(), *this ); … … 299 299 300 300 void Visitor::visit( UntypedValofExpr *valofExpr ) { 301 maybeAccept( valofExpr->get_result(), *this );301 acceptAll( valofExpr->get_results(), *this ); 302 302 maybeAccept( valofExpr->get_body(), *this ); 303 303 }
Note:
See TracChangeset
for help on using the changeset viewer.