Index: src/AST/Node.hpp
===================================================================
--- src/AST/Node.hpp	(revision ee574a219a52c0b47523b1a790d363cc61f813d3)
+++ src/AST/Node.hpp	(revision 67130fe7c6ae00bc7c6da280f8b700e5bc850a3c)
@@ -18,4 +18,6 @@
 #include <cassert>
 #include <iosfwd>
+
+#include "Common/ErrorObjects.h"  // for SemanticErrorException
 
 namespace ast {
@@ -100,4 +102,22 @@
 }
 
+/// Call a visitor on a collection of nodes, throwing any exceptions when completed
+template< typename Container >
+void accept_each( const Container & c, Visitor & v ) {
+	SemanticErrorException errors;
+	for ( const auto & i : c ) {
+		try {
+			if ( i ) {
+				i->accept( v );
+			}
+		} catch ( SemanticErrorException & e ) {
+			errors.append( e );
+		}
+	}
+	if ( ! errors.isEmpty() ) {
+		throw errors;
+	}
+}
+
 /// Base class for the smart pointer types
 /// should never really be used.
