Index: src/SynTree/Mutator.cc
===================================================================
--- src/SynTree/Mutator.cc	(revision 7c782aff4b836a71e18dd75c37d3b3e43582a5bc)
+++ src/SynTree/Mutator.cc	(revision cfaf9beb67593b36a3927861cb7bb364983f7938)
@@ -32,525 +32,4 @@
 
 Mutator::~Mutator() {}
-
-DeclarationWithType * Mutator::mutate( ObjectDecl *objectDecl ) {
-	objectDecl->set_type( maybeMutate( objectDecl->get_type(), *this ) );
-	objectDecl->set_init( maybeMutate( objectDecl->get_init(), *this ) );
-	objectDecl->set_bitfieldWidth( maybeMutate( objectDecl->get_bitfieldWidth(), *this ) );
-	mutateAll( objectDecl->attributes, *this );
-	return objectDecl;
-}
-
-DeclarationWithType * Mutator::mutate( FunctionDecl *functionDecl ) {
-	functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
-	functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
-	mutateAll( functionDecl->attributes, *this );
-	return functionDecl;
-}
-
-Declaration * Mutator::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
-	mutateAll( aggregateDecl->get_parameters(), *this );
-	mutateAll( aggregateDecl->get_members(), *this );
-	return aggregateDecl;
-}
-
-Declaration * Mutator::mutate( StructDecl *aggregateDecl ) {
-	handleAggregateDecl( aggregateDecl );
-	return aggregateDecl;
-}
-
-Declaration * Mutator::mutate( UnionDecl *aggregateDecl ) {
-	handleAggregateDecl( aggregateDecl );
-	return aggregateDecl;
-}
-
-Declaration * Mutator::mutate( EnumDecl *aggregateDecl ) {
-	handleAggregateDecl( aggregateDecl );
-	return aggregateDecl;
-}
-
-Declaration * Mutator::mutate( TraitDecl *aggregateDecl ) {
-	handleAggregateDecl( aggregateDecl );
-	return aggregateDecl;
-}
-
-Declaration * Mutator::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
-	mutateAll( typeDecl->get_parameters(), *this );
-	mutateAll( typeDecl->get_assertions(), *this );
-	typeDecl->set_base( maybeMutate( typeDecl->get_base(), *this ) );
-	return typeDecl;
-}
-
-Declaration * Mutator::mutate( TypeDecl *typeDecl ) {
-	handleNamedTypeDecl( typeDecl );
-	typeDecl->set_init( maybeMutate( typeDecl->get_init(), *this ) );
-	return typeDecl;
-}
-
-Declaration * Mutator::mutate( TypedefDecl *typeDecl ) {
-	handleNamedTypeDecl( typeDecl );
-	return typeDecl;
-}
-
-AsmDecl * Mutator::mutate( AsmDecl *asmDecl ) {
-	asmDecl->set_stmt( maybeMutate( asmDecl->get_stmt(), *this ) );
-	return asmDecl;
-}
-
-
-CompoundStmt * Mutator::mutate( CompoundStmt *compoundStmt ) {
-	mutateAll( compoundStmt->get_kids(), *this );
-	return compoundStmt;
-}
-
-Statement * Mutator::mutate( ExprStmt *exprStmt ) {
-	exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) );
-	return exprStmt;
-}
-
-Statement * Mutator::mutate( AsmStmt *asmStmt ) {
-	asmStmt->set_instruction( maybeMutate( asmStmt->get_instruction(), *this ) );
-	mutateAll( asmStmt->get_output(), *this );
-	mutateAll( asmStmt->get_input(), *this );
-	mutateAll( asmStmt->get_clobber(), *this );
-	return asmStmt;
-}
-
-Statement * Mutator::mutate( IfStmt *ifStmt ) {
-	mutateAll( ifStmt->get_initialization(), *this );
-	ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) );
-	ifStmt->set_thenPart( maybeMutate( ifStmt->get_thenPart(), *this ) );
-	ifStmt->set_elsePart( maybeMutate( ifStmt->get_elsePart(), *this ) );
-	return ifStmt;
-}
-
-Statement * Mutator::mutate( WhileStmt *whileStmt ) {
-	whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) );
-	whileStmt->set_body( maybeMutate( whileStmt->get_body(), *this ) );
-	return whileStmt;
-}
-
-Statement * Mutator::mutate( ForStmt *forStmt ) {
-	mutateAll( forStmt->get_initialization(), *this );
-	forStmt->set_condition( maybeMutate( forStmt->get_condition(), *this ) );
-	forStmt->set_increment( maybeMutate( forStmt->get_increment(), *this ) );
-	forStmt->set_body( maybeMutate( forStmt->get_body(), *this ) );
-	return forStmt;
-}
-
-Statement * Mutator::mutate( SwitchStmt *switchStmt ) {
-	switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
-	mutateAll( switchStmt->get_statements(), *this );
-	return switchStmt;
-}
-
-Statement * Mutator::mutate( CaseStmt *caseStmt ) {
-	caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) );
-	mutateAll (caseStmt->get_statements(), *this );
-
-	return caseStmt;
-}
-
-Statement * Mutator::mutate( BranchStmt *branchStmt ) {
-	return branchStmt;
-}
-
-Statement * Mutator::mutate( ReturnStmt *returnStmt ) {
-	returnStmt->set_expr( maybeMutate( returnStmt->get_expr(), *this ) );
-	return returnStmt;
-}
-
-Statement * Mutator::mutate( ThrowStmt *throwStmt ) {
-	throwStmt->set_expr( maybeMutate( throwStmt->get_expr(), *this ) );
-	throwStmt->set_target( maybeMutate( throwStmt->get_target(), *this ) );
-	return throwStmt;
-}
-
-Statement * Mutator::mutate( TryStmt *tryStmt ) {
-	tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
-	mutateAll( tryStmt->get_catchers(), *this );
-	tryStmt->set_finally( maybeMutate( tryStmt->get_finally(), *this ) );
-	return tryStmt;
-}
-
-Statement * Mutator::mutate( CatchStmt *catchStmt ) {
-	catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
-	catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );
-	catchStmt->set_body( maybeMutate( catchStmt->get_body(), *this ) );
-	return catchStmt;
-}
-
-Statement * Mutator::mutate( FinallyStmt *finalStmt ) {
-	finalStmt->set_block( maybeMutate( finalStmt->get_block(), *this ) );
-	return finalStmt;
-}
-
-Statement * Mutator::mutate( WaitForStmt *waitforStmt ) {
-	for( auto & clause : waitforStmt->clauses ) {
-		clause.target.function = maybeMutate( clause.target.function, *this );
-		mutateAll( clause.target.arguments, *this );
-
-		clause.statement = maybeMutate( clause.statement, *this );
-		clause.condition = maybeMutate( clause.condition, *this );
-	}
-
-	waitforStmt->timeout.time      = maybeMutate( waitforStmt->timeout.time, *this );
-	waitforStmt->timeout.statement = maybeMutate( waitforStmt->timeout.statement, *this );
-	waitforStmt->timeout.condition = maybeMutate( waitforStmt->timeout.condition, *this );
-	waitforStmt->orelse.statement  = maybeMutate( waitforStmt->orelse.statement, *this );
-	waitforStmt->orelse.condition  = maybeMutate( waitforStmt->orelse.condition, *this );
-
-	return waitforStmt;
-}
-
-Statement * Mutator::mutate( WithStmt * withStmt ) {
-	mutateAll( withStmt->exprs, *this );
-	withStmt->stmt = maybeMutate( withStmt->stmt, *this );
-	return withStmt;
-}
-
-NullStmt * Mutator::mutate( NullStmt *nullStmt ) {
-	return nullStmt;
-}
-
-Statement * Mutator::mutate( DeclStmt *declStmt ) {
-	declStmt->set_decl( maybeMutate( declStmt->get_decl(), *this ) );
-	return declStmt;
-}
-
-Statement * Mutator::mutate( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
-	impCtorDtorStmt->set_callStmt( maybeMutate( impCtorDtorStmt->get_callStmt(), *this ) );
-	return impCtorDtorStmt;
-}
-
-
-Expression * Mutator::mutate( ApplicationExpr *applicationExpr ) {
-	applicationExpr->set_env( maybeMutate( applicationExpr->get_env(), *this ) );
-	applicationExpr->set_result( maybeMutate( applicationExpr->get_result(), *this ) );
-	applicationExpr->set_function( maybeMutate( applicationExpr->get_function(), *this ) );
-	mutateAll( applicationExpr->get_args(), *this );
-	return applicationExpr;
-}
-
-Expression * Mutator::mutate( UntypedExpr *untypedExpr ) {
-	untypedExpr->set_env( maybeMutate( untypedExpr->get_env(), *this ) );
-	untypedExpr->set_result( maybeMutate( untypedExpr->get_result(), *this ) );
-	mutateAll( untypedExpr->get_args(), *this );
-	return untypedExpr;
-}
-
-Expression * Mutator::mutate( NameExpr *nameExpr ) {
-	nameExpr->set_env( maybeMutate( nameExpr->get_env(), *this ) );
-	nameExpr->set_result( maybeMutate( nameExpr->get_result(), *this ) );
-	return nameExpr;
-}
-
-Expression * Mutator::mutate( AddressExpr *addressExpr ) {
-	addressExpr->set_env( maybeMutate( addressExpr->get_env(), *this ) );
-	addressExpr->set_result( maybeMutate( addressExpr->get_result(), *this ) );
-	addressExpr->set_arg( maybeMutate( addressExpr->get_arg(), *this ) );
-	return addressExpr;
-}
-
-Expression * Mutator::mutate( LabelAddressExpr *labelAddressExpr ) {
-	labelAddressExpr->set_env( maybeMutate( labelAddressExpr->get_env(), *this ) );
-	labelAddressExpr->set_result( maybeMutate( labelAddressExpr->get_result(), *this ) );
-	return labelAddressExpr;
-}
-
-Expression * Mutator::mutate( CastExpr *castExpr ) {
-	castExpr->set_env( maybeMutate( castExpr->get_env(), *this ) );
-	castExpr->set_result( maybeMutate( castExpr->get_result(), *this ) );
-	castExpr->set_arg( maybeMutate( castExpr->get_arg(), *this ) );
-	return castExpr;
-}
-
-Expression * Mutator::mutate( VirtualCastExpr *castExpr ) {
-	castExpr->set_env( maybeMutate( castExpr->get_env(), *this ) );
-	castExpr->set_result( maybeMutate( castExpr->get_result(), *this ) );
-	castExpr->set_arg( maybeMutate( castExpr->get_arg(), *this ) );
-	return castExpr;
-}
-
-Expression * Mutator::mutate( UntypedMemberExpr *memberExpr ) {
-	memberExpr->set_env( maybeMutate( memberExpr->get_env(), *this ) );
-	memberExpr->set_result( maybeMutate( memberExpr->get_result(), *this ) );
-	memberExpr->set_aggregate( maybeMutate( memberExpr->get_aggregate(), *this ) );
-	memberExpr->set_member( maybeMutate( memberExpr->get_member(), *this ) );
-	return memberExpr;
-}
-
-Expression * Mutator::mutate( MemberExpr *memberExpr ) {
-	memberExpr->set_env( maybeMutate( memberExpr->get_env(), *this ) );
-	memberExpr->set_result( maybeMutate( memberExpr->get_result(), *this ) );
-	memberExpr->set_aggregate( maybeMutate( memberExpr->get_aggregate(), *this ) );
-	return memberExpr;
-}
-
-Expression * Mutator::mutate( VariableExpr *variableExpr ) {
-	variableExpr->set_env( maybeMutate( variableExpr->get_env(), *this ) );
-	variableExpr->set_result( maybeMutate( variableExpr->get_result(), *this ) );
-	return variableExpr;
-}
-
-Expression * Mutator::mutate( ConstantExpr *constantExpr ) {
-	constantExpr->set_env( maybeMutate( constantExpr->get_env(), *this ) );
-	constantExpr->set_result( maybeMutate( constantExpr->get_result(), *this ) );
-//  maybeMutate( constantExpr->get_constant(), *this )
-	return constantExpr;
-}
-
-Expression * Mutator::mutate( SizeofExpr *sizeofExpr ) {
-	sizeofExpr->set_env( maybeMutate( sizeofExpr->get_env(), *this ) );
-	sizeofExpr->set_result( maybeMutate( sizeofExpr->get_result(), *this ) );
-	if ( sizeofExpr->get_isType() ) {
-		sizeofExpr->set_type( maybeMutate( sizeofExpr->get_type(), *this ) );
-	} else {
-		sizeofExpr->set_expr( maybeMutate( sizeofExpr->get_expr(), *this ) );
-	}
-	return sizeofExpr;
-}
-
-Expression * Mutator::mutate( AlignofExpr *alignofExpr ) {
-	alignofExpr->set_env( maybeMutate( alignofExpr->get_env(), *this ) );
-	alignofExpr->set_result( maybeMutate( alignofExpr->get_result(), *this ) );
-	if ( alignofExpr->get_isType() ) {
-		alignofExpr->set_type( maybeMutate( alignofExpr->get_type(), *this ) );
-	} else {
-		alignofExpr->set_expr( maybeMutate( alignofExpr->get_expr(), *this ) );
-	}
-	return alignofExpr;
-}
-
-Expression * Mutator::mutate( UntypedOffsetofExpr *offsetofExpr ) {
-	offsetofExpr->set_env( maybeMutate( offsetofExpr->get_env(), *this ) );
-	offsetofExpr->set_result( maybeMutate( offsetofExpr->get_result(), *this ) );
-	offsetofExpr->set_type( maybeMutate( offsetofExpr->get_type(), *this ) );
-	return offsetofExpr;
-}
-
-Expression * Mutator::mutate( OffsetofExpr *offsetofExpr ) {
-	offsetofExpr->set_env( maybeMutate( offsetofExpr->get_env(), *this ) );
-	offsetofExpr->set_result( maybeMutate( offsetofExpr->get_result(), *this ) );
-	offsetofExpr->set_type( maybeMutate( offsetofExpr->get_type(), *this ) );
-	offsetofExpr->set_member( maybeMutate( offsetofExpr->get_member(), *this ) );
-	return offsetofExpr;
-}
-
-Expression * Mutator::mutate( OffsetPackExpr *offsetPackExpr ) {
-	offsetPackExpr->set_env( maybeMutate( offsetPackExpr->get_env(), *this ) );
-	offsetPackExpr->set_result( maybeMutate( offsetPackExpr->get_result(), *this ) );
-	offsetPackExpr->set_type( maybeMutate( offsetPackExpr->get_type(), *this ) );
-	return offsetPackExpr;
-}
-
-Expression * Mutator::mutate( AttrExpr *attrExpr ) {
-	attrExpr->set_env( maybeMutate( attrExpr->get_env(), *this ) );
-	attrExpr->set_result( maybeMutate( attrExpr->get_result(), *this ) );
-	if ( attrExpr->get_isType() ) {
-		attrExpr->set_type( maybeMutate( attrExpr->get_type(), *this ) );
-	} else {
-		attrExpr->set_expr( maybeMutate( attrExpr->get_expr(), *this ) );
-	}
-	return attrExpr;
-}
-
-Expression * Mutator::mutate( LogicalExpr *logicalExpr ) {
-	logicalExpr->set_env( maybeMutate( logicalExpr->get_env(), *this ) );
-	logicalExpr->set_result( maybeMutate( logicalExpr->get_result(), *this ) );
-	logicalExpr->set_arg1( maybeMutate( logicalExpr->get_arg1(), *this ) );
-	logicalExpr->set_arg2( maybeMutate( logicalExpr->get_arg2(), *this ) );
-	return logicalExpr;
-}
-
-Expression * Mutator::mutate( ConditionalExpr *conditionalExpr ) {
-	conditionalExpr->set_env( maybeMutate( conditionalExpr->get_env(), *this ) );
-	conditionalExpr->set_result( maybeMutate( conditionalExpr->get_result(), *this ) );
-	conditionalExpr->set_arg1( maybeMutate( conditionalExpr->get_arg1(), *this ) );
-	conditionalExpr->set_arg2( maybeMutate( conditionalExpr->get_arg2(), *this ) );
-	conditionalExpr->set_arg3( maybeMutate( conditionalExpr->get_arg3(), *this ) );
-	return conditionalExpr;
-}
-
-Expression * Mutator::mutate( CommaExpr *commaExpr ) {
-	commaExpr->set_env( maybeMutate( commaExpr->get_env(), *this ) );
-	commaExpr->set_result( maybeMutate( commaExpr->get_result(), *this ) );
-	commaExpr->set_arg1( maybeMutate( commaExpr->get_arg1(), *this ) );
-	commaExpr->set_arg2( maybeMutate( commaExpr->get_arg2(), *this ) );
-	return commaExpr;
-}
-
-Expression * Mutator::mutate( TypeExpr *typeExpr ) {
-	typeExpr->set_env( maybeMutate( typeExpr->get_env(), *this ) );
-	typeExpr->set_result( maybeMutate( typeExpr->get_result(), *this ) );
-	typeExpr->set_type( maybeMutate( typeExpr->get_type(), *this ) );
-	return typeExpr;
-}
-
-Expression * Mutator::mutate( AsmExpr *asmExpr ) {
-	asmExpr->set_env( maybeMutate( asmExpr->get_env(), *this ) );
-	asmExpr->set_inout( maybeMutate( asmExpr->get_inout(), *this ) );
-	asmExpr->set_constraint( maybeMutate( asmExpr->get_constraint(), *this ) );
-	asmExpr->set_operand( maybeMutate( asmExpr->get_operand(), *this ) );
-	return asmExpr;
-}
-
-Expression* Mutator::mutate( ImplicitCopyCtorExpr *impCpCtorExpr ) {
-	impCpCtorExpr->set_env( maybeMutate( impCpCtorExpr->get_env(), *this ) );
-	impCpCtorExpr->set_result( maybeMutate( impCpCtorExpr->get_result(), *this ) );
-	impCpCtorExpr->set_callExpr( maybeMutate( impCpCtorExpr->get_callExpr(), *this ) );
-	mutateAll( impCpCtorExpr->get_tempDecls(), *this );
-	mutateAll( impCpCtorExpr->get_returnDecls(), *this );
-	mutateAll( impCpCtorExpr->get_dtors(), *this );
-	return impCpCtorExpr;
-}
-
-Expression* Mutator::mutate( ConstructorExpr *ctorExpr ) {
-	ctorExpr->set_env( maybeMutate( ctorExpr->get_env(), *this ) );
-	ctorExpr->set_result( maybeMutate( ctorExpr->get_result(), *this ) );
-	ctorExpr->set_callExpr( maybeMutate( ctorExpr->get_callExpr(), *this ) );
-	return ctorExpr;
-}
-
-Expression * Mutator::mutate( CompoundLiteralExpr *compLitExpr ) {
-	compLitExpr->set_env( maybeMutate( compLitExpr->get_env(), *this ) );
-	compLitExpr->set_result( maybeMutate( compLitExpr->get_result(), *this ) );
-	compLitExpr->set_initializer( maybeMutate( compLitExpr->get_initializer(), *this ) );
-	return compLitExpr;
-}
-
-Expression * Mutator::mutate( RangeExpr *rangeExpr ) {
-	rangeExpr->set_env( maybeMutate( rangeExpr->get_env(), *this ) );
-	rangeExpr->set_low( maybeMutate( rangeExpr->get_low(), *this ) );
-	rangeExpr->set_high( maybeMutate( rangeExpr->get_high(), *this ) );
-	return rangeExpr;
-}
-
-Expression * Mutator::mutate( UntypedTupleExpr *tupleExpr ) {
-	tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) );
-	tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) );
-	mutateAll( tupleExpr->get_exprs(), *this );
-	return tupleExpr;
-}
-
-Expression * Mutator::mutate( TupleExpr *tupleExpr ) {
-	tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) );
-	tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) );
-	mutateAll( tupleExpr->get_exprs(), *this );
-	return tupleExpr;
-}
-
-Expression * Mutator::mutate( TupleIndexExpr *tupleExpr ) {
-	tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) );
-	tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) );
-	tupleExpr->set_tuple( maybeMutate( tupleExpr->get_tuple(), *this ) );
-	return tupleExpr;
-}
-
-Expression * Mutator::mutate( TupleAssignExpr *assignExpr ) {
-	assignExpr->set_env( maybeMutate( assignExpr->get_env(), *this ) );
-	assignExpr->set_result( maybeMutate( assignExpr->get_result(), *this ) );
-	assignExpr->set_stmtExpr( maybeMutate( assignExpr->get_stmtExpr(), *this ) );
-	return assignExpr;
-}
-
-Expression * Mutator::mutate( StmtExpr *stmtExpr ) {
-	stmtExpr->set_env( maybeMutate( stmtExpr->get_env(), *this ) );
-	stmtExpr->set_result( maybeMutate( stmtExpr->get_result(), *this ) );
-	stmtExpr->set_statements( maybeMutate( stmtExpr->get_statements(), *this ) );
-	mutateAll( stmtExpr->get_returnDecls(), *this );
-	mutateAll( stmtExpr->get_dtors(), *this );
-	return stmtExpr;
-}
-
-Expression * Mutator::mutate( UniqueExpr *uniqueExpr ) {
-	uniqueExpr->set_env( maybeMutate( uniqueExpr->get_env(), *this ) );
-	uniqueExpr->set_result( maybeMutate( uniqueExpr->get_result(), *this ) );
-	uniqueExpr->set_expr( maybeMutate( uniqueExpr->get_expr(), *this ) );
-	return uniqueExpr;
-}
-
-Expression * Mutator::mutate( UntypedInitExpr * initExpr ) {
-	initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) );
-	initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) );
-	initExpr->set_expr( maybeMutate( initExpr->get_expr(), *this ) );
-	// not currently mutating initAlts, but this doesn't matter since this node is only used in the resolver.
-	return initExpr;
-}
-
-Expression * Mutator::mutate( InitExpr * initExpr ) {
-	initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) );
-	initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) );
-	initExpr->set_expr( maybeMutate( initExpr->get_expr(), *this ) );
-	initExpr->set_designation( maybeMutate( initExpr->get_designation(), *this ) );
-	return initExpr;
-}
-
-
-Type * Mutator::mutate( VoidType *voidType ) {
-	mutateAll( voidType->get_forall(), *this );
-	return voidType;
-}
-
-Type * Mutator::mutate( BasicType *basicType ) {
-	mutateAll( basicType->get_forall(), *this );
-	return basicType;
-}
-
-Type * Mutator::mutate( PointerType *pointerType ) {
-	mutateAll( pointerType->get_forall(), *this );
-	pointerType->set_base( maybeMutate( pointerType->get_base(), *this ) );
-	return pointerType;
-}
-
-Type * Mutator::mutate( ArrayType *arrayType ) {
-	mutateAll( arrayType->get_forall(), *this );
-	arrayType->set_dimension( maybeMutate( arrayType->get_dimension(), *this ) );
-	arrayType->set_base( maybeMutate( arrayType->get_base(), *this ) );
-	return arrayType;
-}
-
-Type * Mutator::mutate( ReferenceType * refType ) {
-	mutateAll( refType->get_forall(), *this );
-	refType->set_base( maybeMutate( refType->get_base(), *this ) );
-	return refType;
-}
-
-Type * Mutator::mutate( FunctionType * functionType ) {
-	mutateAll( functionType->get_forall(), *this );
-	mutateAll( functionType->get_returnVals(), *this );
-	mutateAll( functionType->get_parameters(), *this );
-	return functionType;
-}
-
-Type * Mutator::handleReferenceToType( ReferenceToType *aggregateUseType ) {
-	mutateAll( aggregateUseType->get_forall(), *this );
-	mutateAll( aggregateUseType->get_parameters(), *this );
-	return aggregateUseType;
-}
-
-Type * Mutator::mutate( StructInstType *aggregateUseType ) {
-	handleReferenceToType( aggregateUseType );
-	return aggregateUseType;
-}
-
-Type * Mutator::mutate( UnionInstType *aggregateUseType ) {
-	handleReferenceToType( aggregateUseType );
-	return aggregateUseType;
-}
-
-Type * Mutator::mutate( EnumInstType *aggregateUseType ) {
-	handleReferenceToType( aggregateUseType );
-	return aggregateUseType;
-}
-
-Type * Mutator::mutate( TraitInstType *aggregateUseType ) {
-	handleReferenceToType( aggregateUseType );
-	return aggregateUseType;
-}
-
-Type * Mutator::mutate( TypeInstType *aggregateUseType ) {
-	handleReferenceToType( aggregateUseType );
-	return aggregateUseType;
-}
 
 Type * Mutator::mutate( TupleType *tupleType ) {
Index: src/SynTree/Mutator.h
===================================================================
--- src/SynTree/Mutator.h	(revision 7c782aff4b836a71e18dd75c37d3b3e43582a5bc)
+++ src/SynTree/Mutator.h	(revision cfaf9beb67593b36a3927861cb7bb364983f7938)
@@ -25,104 +25,100 @@
 	virtual ~Mutator();
   public:
-	virtual DeclarationWithType * mutate( ObjectDecl * objectDecl );
-	virtual DeclarationWithType * mutate( FunctionDecl * functionDecl );
-	virtual Declaration * mutate( StructDecl * aggregateDecl );
-	virtual Declaration * mutate( UnionDecl * aggregateDecl );
-	virtual Declaration * mutate( EnumDecl * aggregateDecl );
-	virtual Declaration * mutate( TraitDecl * aggregateDecl );
-	virtual Declaration * mutate( TypeDecl * typeDecl );
-	virtual Declaration * mutate( TypedefDecl * typeDecl );
-	virtual AsmDecl * mutate( AsmDecl * asmDecl );
+	virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ) = 0;
+	virtual DeclarationWithType * mutate( FunctionDecl * functionDecl ) = 0;
+	virtual Declaration * mutate( StructDecl * aggregateDecl ) = 0;
+	virtual Declaration * mutate( UnionDecl * aggregateDecl ) = 0;
+	virtual Declaration * mutate( EnumDecl * aggregateDecl ) = 0;
+	virtual Declaration * mutate( TraitDecl * aggregateDecl ) = 0;
+	virtual Declaration * mutate( TypeDecl * typeDecl ) = 0;
+	virtual Declaration * mutate( TypedefDecl * typeDecl ) = 0;
+	virtual AsmDecl * mutate( AsmDecl * asmDecl ) = 0;
 
-	virtual CompoundStmt * mutate( CompoundStmt * compoundStmt );
-	virtual Statement * mutate( ExprStmt * exprStmt );
-	virtual Statement * mutate( AsmStmt * asmStmt );
-	virtual Statement * mutate( IfStmt * ifStmt );
-	virtual Statement * mutate( WhileStmt * whileStmt );
-	virtual Statement * mutate( ForStmt * forStmt );
-	virtual Statement * mutate( SwitchStmt * switchStmt );
-	virtual Statement * mutate( CaseStmt * caseStmt );
-	virtual Statement * mutate( BranchStmt * branchStmt );
-	virtual Statement * mutate( ReturnStmt * returnStmt );
-	virtual Statement * mutate( ThrowStmt * throwStmt );
-	virtual Statement * mutate( TryStmt * tryStmt );
-	virtual Statement * mutate( CatchStmt * catchStmt );
-	virtual Statement * mutate( FinallyStmt * catchStmt );
-	virtual Statement * mutate( WaitForStmt * waitforStmt );
-	virtual Statement * mutate( WithStmt * withStmt );
-	virtual NullStmt * mutate( NullStmt * nullStmt );
-	virtual Statement * mutate( DeclStmt * declStmt );
-	virtual Statement * mutate( ImplicitCtorDtorStmt * impCtorDtorStmt );
+	virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ) = 0;
+	virtual Statement * mutate( ExprStmt * exprStmt ) = 0;
+	virtual Statement * mutate( AsmStmt * asmStmt ) = 0;
+	virtual Statement * mutate( IfStmt * ifStmt ) = 0;
+	virtual Statement * mutate( WhileStmt * whileStmt ) = 0;
+	virtual Statement * mutate( ForStmt * forStmt ) = 0;
+	virtual Statement * mutate( SwitchStmt * switchStmt ) = 0;
+	virtual Statement * mutate( CaseStmt * caseStmt ) = 0;
+	virtual Statement * mutate( BranchStmt * branchStmt ) = 0;
+	virtual Statement * mutate( ReturnStmt * returnStmt ) = 0;
+	virtual Statement * mutate( ThrowStmt * throwStmt ) = 0;
+	virtual Statement * mutate( TryStmt * tryStmt ) = 0;
+	virtual Statement * mutate( CatchStmt * catchStmt ) = 0;
+	virtual Statement * mutate( FinallyStmt * catchStmt ) = 0;
+	virtual Statement * mutate( WaitForStmt * waitforStmt ) = 0;
+	virtual Statement * mutate( WithStmt * withStmt ) = 0;
+	virtual NullStmt * mutate( NullStmt * nullStmt ) = 0;
+	virtual Statement * mutate( DeclStmt * declStmt ) = 0;
+	virtual Statement * mutate( ImplicitCtorDtorStmt * impCtorDtorStmt ) = 0;
 
-	virtual Expression * mutate( ApplicationExpr * applicationExpr );
-	virtual Expression * mutate( UntypedExpr * untypedExpr );
-	virtual Expression * mutate( NameExpr * nameExpr );
-	virtual Expression * mutate( AddressExpr * castExpr );
-	virtual Expression * mutate( LabelAddressExpr * labAddressExpr );
-	virtual Expression * mutate( CastExpr * castExpr );
-	virtual Expression * mutate( VirtualCastExpr * castExpr );
-	virtual Expression * mutate( UntypedMemberExpr * memberExpr );
-	virtual Expression * mutate( MemberExpr * memberExpr );
-	virtual Expression * mutate( VariableExpr * variableExpr );
-	virtual Expression * mutate( ConstantExpr * constantExpr );
-	virtual Expression * mutate( SizeofExpr * sizeofExpr );
-	virtual Expression * mutate( AlignofExpr * alignofExpr );
-	virtual Expression * mutate( UntypedOffsetofExpr * offsetofExpr );
-	virtual Expression * mutate( OffsetofExpr * offsetofExpr );
-	virtual Expression * mutate( OffsetPackExpr * offsetPackExpr );
-	virtual Expression * mutate( AttrExpr * attrExpr );
-	virtual Expression * mutate( LogicalExpr * logicalExpr );
-	virtual Expression * mutate( ConditionalExpr * conditionalExpr );
-	virtual Expression * mutate( CommaExpr * commaExpr );
-	virtual Expression * mutate( TypeExpr * typeExpr );
-	virtual Expression * mutate( AsmExpr * asmExpr );
-	virtual Expression * mutate( ImplicitCopyCtorExpr * impCpCtorExpr );
-	virtual Expression * mutate( ConstructorExpr * ctorExpr );
-	virtual Expression * mutate( CompoundLiteralExpr * compLitExpr );
-	virtual Expression * mutate( RangeExpr * rangeExpr );
-	virtual Expression * mutate( UntypedTupleExpr * tupleExpr );
-	virtual Expression * mutate( TupleExpr * tupleExpr );
-	virtual Expression * mutate( TupleIndexExpr * tupleExpr );
-	virtual Expression * mutate( TupleAssignExpr * assignExpr );
-	virtual Expression * mutate( StmtExpr  * stmtExpr );
-	virtual Expression * mutate( UniqueExpr  * uniqueExpr );
-	virtual Expression * mutate( UntypedInitExpr  * initExpr );
-	virtual Expression * mutate( InitExpr  * initExpr );
+	virtual Expression * mutate( ApplicationExpr * applicationExpr ) = 0;
+	virtual Expression * mutate( UntypedExpr * untypedExpr ) = 0;
+	virtual Expression * mutate( NameExpr * nameExpr ) = 0;
+	virtual Expression * mutate( AddressExpr * castExpr ) = 0;
+	virtual Expression * mutate( LabelAddressExpr * labAddressExpr ) = 0;
+	virtual Expression * mutate( CastExpr * castExpr ) = 0;
+	virtual Expression * mutate( VirtualCastExpr * castExpr ) = 0;
+	virtual Expression * mutate( UntypedMemberExpr * memberExpr ) = 0;
+	virtual Expression * mutate( MemberExpr * memberExpr ) = 0;
+	virtual Expression * mutate( VariableExpr * variableExpr ) = 0;
+	virtual Expression * mutate( ConstantExpr * constantExpr ) = 0;
+	virtual Expression * mutate( SizeofExpr * sizeofExpr ) = 0;
+	virtual Expression * mutate( AlignofExpr * alignofExpr ) = 0;
+	virtual Expression * mutate( UntypedOffsetofExpr * offsetofExpr ) = 0;
+	virtual Expression * mutate( OffsetofExpr * offsetofExpr ) = 0;
+	virtual Expression * mutate( OffsetPackExpr * offsetPackExpr ) = 0;
+	virtual Expression * mutate( AttrExpr * attrExpr ) = 0;
+	virtual Expression * mutate( LogicalExpr * logicalExpr ) = 0;
+	virtual Expression * mutate( ConditionalExpr * conditionalExpr ) = 0;
+	virtual Expression * mutate( CommaExpr * commaExpr ) = 0;
+	virtual Expression * mutate( TypeExpr * typeExpr ) = 0;
+	virtual Expression * mutate( AsmExpr * asmExpr ) = 0;
+	virtual Expression * mutate( ImplicitCopyCtorExpr * impCpCtorExpr ) = 0;
+	virtual Expression * mutate( ConstructorExpr * ctorExpr ) = 0;
+	virtual Expression * mutate( CompoundLiteralExpr * compLitExpr ) = 0;
+	virtual Expression * mutate( RangeExpr * rangeExpr ) = 0;
+	virtual Expression * mutate( UntypedTupleExpr * tupleExpr ) = 0;
+	virtual Expression * mutate( TupleExpr * tupleExpr ) = 0;
+	virtual Expression * mutate( TupleIndexExpr * tupleExpr ) = 0;
+	virtual Expression * mutate( TupleAssignExpr * assignExpr ) = 0;
+	virtual Expression * mutate( StmtExpr  * stmtExpr ) = 0;
+	virtual Expression * mutate( UniqueExpr  * uniqueExpr ) = 0;
+	virtual Expression * mutate( UntypedInitExpr  * initExpr ) = 0;
+	virtual Expression * mutate( InitExpr  * initExpr ) = 0;
 	virtual Expression * mutate( DeletedExpr * delExpr ) = 0;
 
-	virtual Type * mutate( VoidType * basicType );
-	virtual Type * mutate( BasicType * basicType );
-	virtual Type * mutate( PointerType * pointerType );
-	virtual Type * mutate( ArrayType * arrayType );
-	virtual Type * mutate( ReferenceType * refType );
-	virtual Type * mutate( FunctionType * functionType );
-	virtual Type * mutate( StructInstType * aggregateUseType );
-	virtual Type * mutate( UnionInstType * aggregateUseType );
-	virtual Type * mutate( EnumInstType * aggregateUseType );
-	virtual Type * mutate( TraitInstType * aggregateUseType );
-	virtual Type * mutate( TypeInstType * aggregateUseType );
-	virtual Type * mutate( TupleType * tupleType );
-	virtual Type * mutate( TypeofType * typeofType );
-	virtual Type * mutate( AttrType * attrType );
-	virtual Type * mutate( VarArgsType * varArgsType );
-	virtual Type * mutate( ZeroType * zeroType );
-	virtual Type * mutate( OneType * oneType );
+	virtual Type * mutate( VoidType * basicType ) = 0;
+	virtual Type * mutate( BasicType * basicType ) = 0;
+	virtual Type * mutate( PointerType * pointerType ) = 0;
+	virtual Type * mutate( ArrayType * arrayType ) = 0;
+	virtual Type * mutate( ReferenceType * refType ) = 0;
+	virtual Type * mutate( FunctionType * functionType ) = 0;
+	virtual Type * mutate( StructInstType * aggregateUseType ) = 0;
+	virtual Type * mutate( UnionInstType * aggregateUseType ) = 0;
+	virtual Type * mutate( EnumInstType * aggregateUseType ) = 0;
+	virtual Type * mutate( TraitInstType * aggregateUseType ) = 0;
+	virtual Type * mutate( TypeInstType * aggregateUseType ) = 0;
+	virtual Type * mutate( TupleType * tupleType ) = 0;
+	virtual Type * mutate( TypeofType * typeofType ) = 0;
+	virtual Type * mutate( AttrType * attrType ) = 0;
+	virtual Type * mutate( VarArgsType * varArgsType ) = 0;
+	virtual Type * mutate( ZeroType * zeroType ) = 0;
+	virtual Type * mutate( OneType * oneType ) = 0;
 
-	virtual Designation * mutate( Designation * designation );
-	virtual Initializer * mutate( SingleInit * singleInit );
-	virtual Initializer * mutate( ListInit * listInit );
-	virtual Initializer * mutate( ConstructorInit * ctorInit );
+	virtual Designation * mutate( Designation * designation ) = 0 ;
+	virtual Initializer * mutate( SingleInit * singleInit ) = 0 ;
+	virtual Initializer * mutate( ListInit * listInit ) = 0 ;
+	virtual Initializer * mutate( ConstructorInit * ctorInit ) = 0 ;
 
-	virtual Subrange * mutate( Subrange * subrange );
+	virtual Subrange * mutate( Subrange * subrange ) = 0;
 
-	virtual Constant * mutate( Constant * constant );
+	virtual Constant * mutate( Constant * constant ) = 0;
 
-	virtual Attribute * mutate( Attribute * attribute );
+	virtual Attribute * mutate( Attribute * attribute ) = 0;
 
-	virtual TypeSubstitution * mutate( TypeSubstitution * sub );
-  private:
-	virtual Declaration * handleAggregateDecl(AggregateDecl * aggregateDecl );
-	virtual Declaration * handleNamedTypeDecl(NamedTypeDecl * typeDecl );
-	virtual Type * handleReferenceToType(ReferenceToType * aggregateUseType );
+	virtual TypeSubstitution * mutate( TypeSubstitution * sub ) = 0;
 };
 
Index: src/SynTree/Visitor.cc
===================================================================
--- src/SynTree/Visitor.cc	(revision 7c782aff4b836a71e18dd75c37d3b3e43582a5bc)
+++ src/SynTree/Visitor.cc	(revision cfaf9beb67593b36a3927861cb7bb364983f7938)
@@ -31,414 +31,4 @@
 
 Visitor::~Visitor() {}
-
-void Visitor::visit( ObjectDecl *objectDecl ) {
-	maybeAccept( objectDecl->get_type(), *this );
-	maybeAccept( objectDecl->get_init(), *this );
-	maybeAccept( objectDecl->get_bitfieldWidth(), *this );
-	acceptAll( objectDecl->attributes, *this );
-}
-
-void Visitor::visit( FunctionDecl *functionDecl ) {
-	maybeAccept( functionDecl->get_functionType(), *this );
-	maybeAccept( functionDecl->get_statements(), *this );
-	acceptAll( functionDecl->attributes, *this );
-}
-
-void Visitor::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
-	acceptAll( aggregateDecl->get_parameters(), *this );
-	acceptAll( aggregateDecl->get_members(), *this );
-}
-
-void Visitor::visit( StructDecl *aggregateDecl ) {
-	handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
-}
-
-void Visitor::visit( UnionDecl *aggregateDecl ) {
-	handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
-}
-
-void Visitor::visit( EnumDecl *aggregateDecl ) {
-	handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
-}
-
-void Visitor::visit( TraitDecl *aggregateDecl ) {
-	handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
-}
-
-void Visitor::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
-	acceptAll( typeDecl->get_parameters(), *this );
-	acceptAll( typeDecl->get_assertions(), *this );
-	maybeAccept( typeDecl->get_base(), *this );
-}
-
-void Visitor::visit( TypeDecl *typeDecl ) {
-	handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
-	maybeAccept( typeDecl->get_init(), *this );
-}
-
-void Visitor::visit( TypedefDecl *typeDecl ) {
-	handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
-}
-
-void Visitor::visit( AsmDecl *asmDecl ) {
-	maybeAccept( asmDecl->get_stmt(), *this );
-}
-
-
-void Visitor::visit( CompoundStmt *compoundStmt ) {
-	acceptAll( compoundStmt->get_kids(), *this );
-}
-
-void Visitor::visit( ExprStmt *exprStmt ) {
-	maybeAccept( exprStmt->get_expr(), *this );
-}
-
-void Visitor::visit( AsmStmt *asmStmt ) {
-	maybeAccept( asmStmt->get_instruction(), *this );
-	acceptAll( asmStmt->get_output(), *this );
-	acceptAll( asmStmt->get_input(), *this );
-	acceptAll( asmStmt->get_clobber(), *this );
-}
-
-void Visitor::visit( IfStmt *ifStmt ) {
-	acceptAll( ifStmt->get_initialization(), *this );
-	maybeAccept( ifStmt->get_condition(), *this );
-	maybeAccept( ifStmt->get_thenPart(), *this );
-	maybeAccept( ifStmt->get_elsePart(), *this );
-}
-
-void Visitor::visit( WhileStmt *whileStmt ) {
-	maybeAccept( whileStmt->get_condition(), *this );
-	maybeAccept( whileStmt->get_body(), *this );
-}
-
-void Visitor::visit( ForStmt *forStmt ) {
-	acceptAll( forStmt->get_initialization(), *this );
-	maybeAccept( forStmt->get_condition(), *this );
-	maybeAccept( forStmt->get_increment(), *this );
-	maybeAccept( forStmt->get_body(), *this );
-}
-
-void Visitor::visit( SwitchStmt *switchStmt ) {
-	maybeAccept( switchStmt->get_condition(), *this );
-	acceptAll( switchStmt->get_statements(), *this );
-}
-
-void Visitor::visit( CaseStmt *caseStmt ) {
-	maybeAccept( caseStmt->get_condition(), *this );
-	acceptAll( caseStmt->get_statements(), *this );
-}
-
-void Visitor::visit( __attribute__((unused)) BranchStmt *branchStmt ) {
-}
-
-void Visitor::visit( ReturnStmt *returnStmt ) {
-	maybeAccept( returnStmt->get_expr(), *this );
-}
-
-void Visitor::visit( ThrowStmt * throwStmt ) {
-	maybeAccept( throwStmt->get_expr(), *this );
-	maybeAccept( throwStmt->get_target(), *this );
-}
-
-void Visitor::visit( TryStmt *tryStmt ) {
-	maybeAccept( tryStmt->get_block(), *this );
-	acceptAll( tryStmt->get_catchers(), *this );
-	maybeAccept( tryStmt->get_finally(), *this );
-}
-
-void Visitor::visit( CatchStmt *catchStmt ) {
-	maybeAccept( catchStmt->get_decl(), *this );
-	maybeAccept( catchStmt->get_cond(), *this );
-	maybeAccept( catchStmt->get_body(), *this );
-}
-
-void Visitor::visit( FinallyStmt *finalStmt ) {
-	maybeAccept( finalStmt->get_block(), *this );
-}
-
-void Visitor::visit( WaitForStmt *waitforStmt ) {
-	for( auto & clause : waitforStmt->clauses ) {
-		maybeAccept( clause.target.function, *this );
-		acceptAll( clause.target.arguments, *this );
-
-		maybeAccept( clause.statement, *this );
-		maybeAccept( clause.condition, *this );
-	}
-
-	maybeAccept( waitforStmt->timeout.time, *this );
-	maybeAccept( waitforStmt->timeout.statement, *this );
-	maybeAccept( waitforStmt->timeout.condition, *this );
-	maybeAccept( waitforStmt->orelse.statement, *this );
-	maybeAccept( waitforStmt->orelse.condition, *this );
-}
-
-void Visitor::visit( WithStmt * withStmt ) {
-	acceptAll( withStmt->exprs, *this );
-	maybeAccept( withStmt->stmt, *this );
-}
-
-void Visitor::visit( NullStmt * ) {
-}
-
-void Visitor::visit( DeclStmt *declStmt ) {
-	maybeAccept( declStmt->get_decl(), *this );
-}
-
-void Visitor::visit( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
-	maybeAccept( impCtorDtorStmt->get_callStmt(), *this );
-}
-
-
-void Visitor::visit( ApplicationExpr *applicationExpr ) {
-	maybeAccept( applicationExpr->get_result(), *this );
-	maybeAccept( applicationExpr->get_function(), *this );
-	acceptAll( applicationExpr->get_args(), *this );
-}
-
-void Visitor::visit( UntypedExpr *untypedExpr ) {
-	maybeAccept( untypedExpr->get_result(), *this );
-	acceptAll( untypedExpr->get_args(), *this );
-}
-
-void Visitor::visit( NameExpr *nameExpr ) {
-	maybeAccept( nameExpr->get_result(), *this );
-}
-
-void Visitor::visit( AddressExpr *addressExpr ) {
-	maybeAccept( addressExpr->get_result(), *this );
-	maybeAccept( addressExpr->get_arg(), *this );
-}
-
-void Visitor::visit( LabelAddressExpr *labAddressExpr ) {
-	maybeAccept( labAddressExpr->get_result(), *this );
-}
-
-void Visitor::visit( CastExpr *castExpr ) {
-	maybeAccept( castExpr->get_result(), *this );
-	maybeAccept( castExpr->get_arg(), *this );
-}
-
-void Visitor::visit( VirtualCastExpr *castExpr ) {
-	maybeAccept( castExpr->get_result(), *this );
-	maybeAccept( castExpr->get_arg(), *this );
-}
-
-void Visitor::visit( UntypedMemberExpr *memberExpr ) {
-	maybeAccept( memberExpr->get_result(), *this );
-	maybeAccept( memberExpr->get_aggregate(), *this );
-	maybeAccept( memberExpr->get_member(), *this );
-}
-
-void Visitor::visit( MemberExpr *memberExpr ) {
-	maybeAccept( memberExpr->get_result(), *this );
-	maybeAccept( memberExpr->get_aggregate(), *this );
-}
-
-void Visitor::visit( VariableExpr *variableExpr ) {
-	maybeAccept( variableExpr->get_result(), *this );
-}
-
-void Visitor::visit( ConstantExpr *constantExpr ) {
-	maybeAccept( constantExpr->get_result(), *this );
-	maybeAccept( constantExpr->get_constant(), *this );
-}
-
-void Visitor::visit( SizeofExpr *sizeofExpr ) {
-	maybeAccept( sizeofExpr->get_result(), *this );
-	if ( sizeofExpr->get_isType() ) {
-		maybeAccept( sizeofExpr->get_type(), *this );
-	} else {
-		maybeAccept( sizeofExpr->get_expr(), *this );
-	}
-}
-
-void Visitor::visit( AlignofExpr *alignofExpr ) {
-	maybeAccept( alignofExpr->get_result(), *this );
-	if ( alignofExpr->get_isType() ) {
-		maybeAccept( alignofExpr->get_type(), *this );
-	} else {
-		maybeAccept( alignofExpr->get_expr(), *this );
-	}
-}
-
-void Visitor::visit( UntypedOffsetofExpr *offsetofExpr ) {
-	maybeAccept( offsetofExpr->get_result(), *this );
-	maybeAccept( offsetofExpr->get_type(), *this );
-}
-
-void Visitor::visit( OffsetofExpr *offsetofExpr ) {
-	maybeAccept( offsetofExpr->get_result(), *this );
-	maybeAccept( offsetofExpr->get_type(), *this );
-	maybeAccept( offsetofExpr->get_member(), *this );
-}
-
-void Visitor::visit( OffsetPackExpr *offsetPackExpr ) {
-	maybeAccept( offsetPackExpr->get_result(), *this );
-	maybeAccept( offsetPackExpr->get_type(), *this );
-}
-
-void Visitor::visit( AttrExpr *attrExpr ) {
-	maybeAccept( attrExpr->get_result(), *this );
-	if ( attrExpr->get_isType() ) {
-		maybeAccept( attrExpr->get_type(), *this );
-	} else {
-		maybeAccept( attrExpr->get_expr(), *this );
-	}
-}
-
-void Visitor::visit( LogicalExpr *logicalExpr ) {
-	maybeAccept( logicalExpr->get_result(), *this );
-	maybeAccept( logicalExpr->get_arg1(), *this );
-	maybeAccept( logicalExpr->get_arg2(), *this );
-}
-
-void Visitor::visit( ConditionalExpr *conditionalExpr ) {
-	maybeAccept( conditionalExpr->get_result(), *this );
-	maybeAccept( conditionalExpr->get_arg1(), *this );
-	maybeAccept( conditionalExpr->get_arg2(), *this );
-	maybeAccept( conditionalExpr->get_arg3(), *this );
-}
-
-void Visitor::visit( CommaExpr *commaExpr ) {
-	maybeAccept( commaExpr->get_result(), *this );
-	maybeAccept( commaExpr->get_arg1(), *this );
-	maybeAccept( commaExpr->get_arg2(), *this );
-}
-
-void Visitor::visit( TypeExpr *typeExpr ) {
-	maybeAccept( typeExpr->get_result(), *this );
-	maybeAccept( typeExpr->get_type(), *this );
-}
-
-void Visitor::visit( AsmExpr *asmExpr ) {
-	maybeAccept( asmExpr->get_inout(), *this );
-	maybeAccept( asmExpr->get_constraint(), *this );
-	maybeAccept( asmExpr->get_operand(), *this );
-}
-
-void Visitor::visit( ImplicitCopyCtorExpr *impCpCtorExpr ) {
-	maybeAccept( impCpCtorExpr->get_result(), *this );
-	maybeAccept( impCpCtorExpr->get_callExpr(), *this );
-	acceptAll( impCpCtorExpr->get_tempDecls(), *this );
-	acceptAll( impCpCtorExpr->get_returnDecls(), *this );
-	acceptAll( impCpCtorExpr->get_dtors(), *this );
-}
-
-void Visitor::visit( ConstructorExpr * ctorExpr ) {
-	maybeAccept( ctorExpr->get_result(), *this );
-	maybeAccept( ctorExpr->get_callExpr(), *this );
-}
-
-void Visitor::visit( CompoundLiteralExpr *compLitExpr ) {
-	maybeAccept( compLitExpr->get_result(), *this );
-	maybeAccept( compLitExpr->get_initializer(), *this );
-}
-
-void Visitor::visit( RangeExpr *rangeExpr ) {
-	maybeAccept( rangeExpr->get_low(), *this );
-	maybeAccept( rangeExpr->get_high(), *this );
-}
-
-void Visitor::visit( UntypedTupleExpr *tupleExpr ) {
-	maybeAccept( tupleExpr->get_result(), *this );
-	acceptAll( tupleExpr->get_exprs(), *this );
-}
-
-void Visitor::visit( TupleExpr *tupleExpr ) {
-	maybeAccept( tupleExpr->get_result(), *this );
-	acceptAll( tupleExpr->get_exprs(), *this );
-}
-
-void Visitor::visit( TupleIndexExpr *tupleExpr ) {
-	maybeAccept( tupleExpr->get_result(), *this );
-	maybeAccept( tupleExpr->get_tuple(), *this );
-}
-
-void Visitor::visit( TupleAssignExpr *assignExpr ) {
-	maybeAccept( assignExpr->get_result(), *this );
-	maybeAccept( assignExpr->get_stmtExpr(), *this );
-}
-
-void Visitor::visit( StmtExpr *stmtExpr ) {
-	maybeAccept( stmtExpr->get_result(), *this );
-	maybeAccept( stmtExpr->get_statements(), *this );
-	acceptAll( stmtExpr->get_returnDecls(), *this );
-	acceptAll( stmtExpr->get_dtors(), *this );
-}
-
-void Visitor::visit( UniqueExpr *uniqueExpr ) {
-	maybeAccept( uniqueExpr->get_result(), *this );
-	maybeAccept( uniqueExpr->get_expr(), *this );
-}
-
-void Visitor::visit( UntypedInitExpr * initExpr ) {
-	maybeAccept( initExpr->get_result(), *this );
-	maybeAccept( initExpr->get_expr(), *this );
-	// not currently visiting initAlts, but this doesn't matter since this node is only used in the resolver.
-}
-
-void Visitor::visit( InitExpr * initExpr ) {
-	maybeAccept( initExpr->get_result(), *this );
-	maybeAccept( initExpr->get_expr(), *this );
-	maybeAccept( initExpr->get_designation(), *this );
-}
-
-
-void Visitor::visit( VoidType *voidType ) {
-	acceptAll( voidType->get_forall(), *this );
-}
-
-void Visitor::visit( BasicType *basicType ) {
-	acceptAll( basicType->get_forall(), *this );
-}
-
-void Visitor::visit( PointerType *pointerType ) {
-	acceptAll( pointerType->get_forall(), *this );
-	// xxx - should PointerType visit/mutate dimension?
-	maybeAccept( pointerType->get_base(), *this );
-}
-
-void Visitor::visit( ArrayType *arrayType ) {
-	acceptAll( arrayType->get_forall(), *this );
-	maybeAccept( arrayType->get_dimension(), *this );
-	maybeAccept( arrayType->get_base(), *this );
-}
-
-void Visitor::visit( ReferenceType *refType ) {
-	acceptAll( refType->get_forall(), *this );
-	maybeAccept( refType->get_base(), *this );
-}
-
-void Visitor::visit( FunctionType *functionType ) {
-	acceptAll( functionType->get_forall(), *this );
-	acceptAll( functionType->get_returnVals(), *this );
-	acceptAll( functionType->get_parameters(), *this );
-}
-
-void Visitor::handleReferenceToType( ReferenceToType *aggregateUseType ) {
-	acceptAll( aggregateUseType->get_forall(), *this );
-	acceptAll( aggregateUseType->get_parameters(), *this );
-}
-
-void Visitor::visit( StructInstType *aggregateUseType ) {
-	handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
-}
-
-void Visitor::visit( UnionInstType *aggregateUseType ) {
-	handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
-}
-
-void Visitor::visit( EnumInstType *aggregateUseType ) {
-	handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
-}
-
-void Visitor::visit( TraitInstType *aggregateUseType ) {
-	handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
-}
-
-void Visitor::visit( TypeInstType *aggregateUseType ) {
-	handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
-}
 
 void Visitor::visit( TupleType *tupleType ) {
Index: src/SynTree/Visitor.h
===================================================================
--- src/SynTree/Visitor.h	(revision 7c782aff4b836a71e18dd75c37d3b3e43582a5bc)
+++ src/SynTree/Visitor.h	(revision cfaf9beb67593b36a3927861cb7bb364983f7938)
@@ -27,102 +27,98 @@
 	// of the given syntax node, but performs no other action.
 
-	virtual void visit( ObjectDecl * objectDecl );
-	virtual void visit( FunctionDecl * functionDecl );
-	virtual void visit( StructDecl * aggregateDecl );
-	virtual void visit( UnionDecl * aggregateDecl );
-	virtual void visit( EnumDecl * aggregateDecl );
-	virtual void visit( TraitDecl * aggregateDecl );
-	virtual void visit( TypeDecl * typeDecl );
-	virtual void visit( TypedefDecl * typeDecl );
-	virtual void visit( AsmDecl * asmDecl );
+	virtual void visit( ObjectDecl * objectDecl ) = 0;
+	virtual void visit( FunctionDecl * functionDecl ) = 0;
+	virtual void visit( StructDecl * aggregateDecl ) = 0;
+	virtual void visit( UnionDecl * aggregateDecl ) = 0;
+	virtual void visit( EnumDecl * aggregateDecl ) = 0;
+	virtual void visit( TraitDecl * aggregateDecl ) = 0;
+	virtual void visit( TypeDecl * typeDecl ) = 0;
+	virtual void visit( TypedefDecl * typeDecl ) = 0;
+	virtual void visit( AsmDecl * asmDecl ) = 0;
 
-	virtual void visit( CompoundStmt * compoundStmt );
-	virtual void visit( ExprStmt * exprStmt );
-	virtual void visit( AsmStmt * asmStmt );
-	virtual void visit( IfStmt * ifStmt );
-	virtual void visit( WhileStmt * whileStmt );
-	virtual void visit( ForStmt * forStmt );
-	virtual void visit( SwitchStmt * switchStmt );
-	virtual void visit( CaseStmt * caseStmt );
-	virtual void visit( BranchStmt * branchStmt );
-	virtual void visit( ReturnStmt * returnStmt );
-	virtual void visit( ThrowStmt * throwStmt );
-	virtual void visit( TryStmt * tryStmt );
-	virtual void visit( CatchStmt * catchStmt );
-	virtual void visit( FinallyStmt * finallyStmt );
-	virtual void visit( WaitForStmt * waitforStmt );
-	virtual void visit( WithStmt * withStmt );
-	virtual void visit( NullStmt * nullStmt );
-	virtual void visit( DeclStmt * declStmt );
-	virtual void visit( ImplicitCtorDtorStmt * impCtorDtorStmt );
+	virtual void visit( CompoundStmt * compoundStmt ) = 0;
+	virtual void visit( ExprStmt * exprStmt ) = 0;
+	virtual void visit( AsmStmt * asmStmt ) = 0;
+	virtual void visit( IfStmt * ifStmt ) = 0;
+	virtual void visit( WhileStmt * whileStmt ) = 0;
+	virtual void visit( ForStmt * forStmt ) = 0;
+	virtual void visit( SwitchStmt * switchStmt ) = 0;
+	virtual void visit( CaseStmt * caseStmt ) = 0;
+	virtual void visit( BranchStmt * branchStmt ) = 0;
+	virtual void visit( ReturnStmt * returnStmt ) = 0;
+	virtual void visit( ThrowStmt * throwStmt ) = 0;
+	virtual void visit( TryStmt * tryStmt ) = 0;
+	virtual void visit( CatchStmt * catchStmt ) = 0;
+	virtual void visit( FinallyStmt * finallyStmt ) = 0;
+	virtual void visit( WaitForStmt * waitforStmt ) = 0;
+	virtual void visit( WithStmt * withStmt ) = 0;
+	virtual void visit( NullStmt * nullStmt ) = 0;
+	virtual void visit( DeclStmt * declStmt ) = 0;
+	virtual void visit( ImplicitCtorDtorStmt * impCtorDtorStmt ) = 0;
 
-	virtual void visit( ApplicationExpr * applicationExpr );
-	virtual void visit( UntypedExpr * untypedExpr );
-	virtual void visit( NameExpr * nameExpr );
-	virtual void visit( CastExpr * castExpr );
-	virtual void visit( VirtualCastExpr * castExpr );
-	virtual void visit( AddressExpr * addressExpr );
-	virtual void visit( LabelAddressExpr * labAddressExpr );
-	virtual void visit( UntypedMemberExpr * memberExpr );
-	virtual void visit( MemberExpr * memberExpr );
-	virtual void visit( VariableExpr * variableExpr );
-	virtual void visit( ConstantExpr * constantExpr );
-	virtual void visit( SizeofExpr * sizeofExpr );
-	virtual void visit( AlignofExpr * alignofExpr );
-	virtual void visit( UntypedOffsetofExpr * offsetofExpr );
-	virtual void visit( OffsetofExpr * offsetofExpr );
-	virtual void visit( OffsetPackExpr * offsetPackExpr );
-	virtual void visit( AttrExpr * attrExpr );
-	virtual void visit( LogicalExpr * logicalExpr );
-	virtual void visit( ConditionalExpr * conditionalExpr );
-	virtual void visit( CommaExpr * commaExpr );
-	virtual void visit( TypeExpr * typeExpr );
-	virtual void visit( AsmExpr * asmExpr );
-	virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr );
-	virtual void visit( ConstructorExpr *  ctorExpr );
-	virtual void visit( CompoundLiteralExpr * compLitExpr );
-	virtual void visit( RangeExpr * rangeExpr );
-	virtual void visit( UntypedTupleExpr * tupleExpr );
-	virtual void visit( TupleExpr * tupleExpr );
-	virtual void visit( TupleIndexExpr * tupleExpr );
-	virtual void visit( TupleAssignExpr * assignExpr );
-	virtual void visit( StmtExpr *  stmtExpr );
-	virtual void visit( UniqueExpr *  uniqueExpr );
-	virtual void visit( UntypedInitExpr *  initExpr );
-	virtual void visit( InitExpr *  initExpr );
+	virtual void visit( ApplicationExpr * applicationExpr ) = 0;
+	virtual void visit( UntypedExpr * untypedExpr ) = 0;
+	virtual void visit( NameExpr * nameExpr ) = 0;
+	virtual void visit( CastExpr * castExpr ) = 0;
+	virtual void visit( VirtualCastExpr * castExpr ) = 0;
+	virtual void visit( AddressExpr * addressExpr ) = 0;
+	virtual void visit( LabelAddressExpr * labAddressExpr ) = 0;
+	virtual void visit( UntypedMemberExpr * memberExpr ) = 0;
+	virtual void visit( MemberExpr * memberExpr ) = 0;
+	virtual void visit( VariableExpr * variableExpr ) = 0;
+	virtual void visit( ConstantExpr * constantExpr ) = 0;
+	virtual void visit( SizeofExpr * sizeofExpr ) = 0;
+	virtual void visit( AlignofExpr * alignofExpr ) = 0;
+	virtual void visit( UntypedOffsetofExpr * offsetofExpr ) = 0;
+	virtual void visit( OffsetofExpr * offsetofExpr ) = 0;
+	virtual void visit( OffsetPackExpr * offsetPackExpr ) = 0;
+	virtual void visit( AttrExpr * attrExpr ) = 0;
+	virtual void visit( LogicalExpr * logicalExpr ) = 0;
+	virtual void visit( ConditionalExpr * conditionalExpr ) = 0;
+	virtual void visit( CommaExpr * commaExpr ) = 0;
+	virtual void visit( TypeExpr * typeExpr ) = 0;
+	virtual void visit( AsmExpr * asmExpr ) = 0;
+	virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr ) = 0;
+	virtual void visit( ConstructorExpr *  ctorExpr ) = 0;
+	virtual void visit( CompoundLiteralExpr * compLitExpr ) = 0;
+	virtual void visit( RangeExpr * rangeExpr ) = 0;
+	virtual void visit( UntypedTupleExpr * tupleExpr ) = 0;
+	virtual void visit( TupleExpr * tupleExpr ) = 0;
+	virtual void visit( TupleIndexExpr * tupleExpr ) = 0;
+	virtual void visit( TupleAssignExpr * assignExpr ) = 0;
+	virtual void visit( StmtExpr *  stmtExpr ) = 0;
+	virtual void visit( UniqueExpr *  uniqueExpr ) = 0;
+	virtual void visit( UntypedInitExpr *  initExpr ) = 0;
+	virtual void visit( InitExpr *  initExpr ) = 0;
 	virtual void visit( DeletedExpr * delExpr ) = 0;
 
-	virtual void visit( VoidType * basicType );
-	virtual void visit( BasicType * basicType );
-	virtual void visit( PointerType * pointerType );
-	virtual void visit( ArrayType * arrayType );
-	virtual void visit( ReferenceType * refType );
-	virtual void visit( FunctionType * functionType );
-	virtual void visit( StructInstType * aggregateUseType );
-	virtual void visit( UnionInstType * aggregateUseType );
-	virtual void visit( EnumInstType * aggregateUseType );
-	virtual void visit( TraitInstType * aggregateUseType );
-	virtual void visit( TypeInstType * aggregateUseType );
-	virtual void visit( TupleType * tupleType );
-	virtual void visit( TypeofType * typeofType );
-	virtual void visit( AttrType * attrType );
-	virtual void visit( VarArgsType * varArgsType );
-	virtual void visit( ZeroType * zeroType );
-	virtual void visit( OneType * oneType );
+	virtual void visit( VoidType * basicType ) = 0;
+	virtual void visit( BasicType * basicType ) = 0;
+	virtual void visit( PointerType * pointerType ) = 0;
+	virtual void visit( ArrayType * arrayType ) = 0;
+	virtual void visit( ReferenceType * refType ) = 0;
+	virtual void visit( FunctionType * functionType ) = 0;
+	virtual void visit( StructInstType * aggregateUseType ) = 0;
+	virtual void visit( UnionInstType * aggregateUseType ) = 0;
+	virtual void visit( EnumInstType * aggregateUseType ) = 0;
+	virtual void visit( TraitInstType * aggregateUseType ) = 0;
+	virtual void visit( TypeInstType * aggregateUseType ) = 0;
+	virtual void visit( TupleType * tupleType ) = 0;
+	virtual void visit( TypeofType * typeofType ) = 0;
+	virtual void visit( AttrType * attrType ) = 0;
+	virtual void visit( VarArgsType * varArgsType ) = 0;
+	virtual void visit( ZeroType * zeroType ) = 0;
+	virtual void visit( OneType * oneType ) = 0;
 
-	virtual void visit( Designation * designation );
-	virtual void visit( SingleInit * singleInit );
-	virtual void visit( ListInit * listInit );
-	virtual void visit( ConstructorInit * ctorInit );
+	virtual void visit( Designation * designation ) = 0;
+	virtual void visit( SingleInit * singleInit ) = 0;
+	virtual void visit( ListInit * listInit ) = 0;
+	virtual void visit( ConstructorInit * ctorInit ) = 0;
 
-	virtual void visit( Subrange * subrange );
+	virtual void visit( Subrange * subrange ) = 0;
 
-	virtual void visit( Constant * constant );
+	virtual void visit( Constant * constant ) = 0;
 
-	virtual void visit( Attribute * attribute );
-  private:
-	virtual void handleAggregateDecl( AggregateDecl *aggregateDecl );
-	virtual void handleNamedTypeDecl( NamedTypeDecl *typeDecl );
-	virtual void handleReferenceToType( ReferenceToType *aggregateUseType );
+	virtual void visit( Attribute * attribute ) = 0;
 };
 
