// // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // SemanticError.cc -- // // Author : Richard C. Bilson // Created On : Mon May 18 07:44:20 2015 // Last Modified By : Peter A. Buhr // Last Modified On : Tue May 19 07:21:25 2015 // Update Count : 1 // #include #include #include #include #include #include "SemanticError.h" SemanticError::SemanticError() { } SemanticError::SemanticError( std::string error ) { errors.push_back( std::string( "Error: " ) + error ); } void SemanticError::append( SemanticError &other ) { errors.splice( errors.end(), other.errors ); } bool SemanticError::isEmpty() const { return errors.empty(); } void SemanticError::print( std::ostream &os ) { std::copy( errors.begin(), errors.end(), std::ostream_iterator< std::string >( os, "\n" ) ); } // Local Variables: // // tab-width: 4 // // mode: c++ // // compile-command: "make install" // // End: //