Changeset 01aeade for translator/Common/SemanticError.cc
- Timestamp:
- May 19, 2015, 7:57:09 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- a08ba92
- Parents:
- 51587aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Common/SemanticError.cc
r51587aa r01aeade 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // XXX.cc --7 // SemanticError.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : 12 // Last Modified On : 13 // Update Count : 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 19 07:21:25 2015 13 // Update Count : 1 14 14 // 15 /*16 * This file is part of the Cforall project17 *18 * $Id: SemanticError.cc,v 1.1 2002/04/27 19:57:10 rcbilson Exp $19 *20 */21 15 22 16 #include <iostream> … … 28 22 #include "SemanticError.h" 29 23 30 SemanticError::SemanticError() 31 { 24 SemanticError::SemanticError() { 32 25 } 33 26 34 SemanticError::SemanticError( std::string error ) 35 { 36 errors.push_back( std::string( "Error: " ) + error ); 27 SemanticError::SemanticError( std::string error ) { 28 errors.push_back( std::string( "Error: " ) + error ); 37 29 } 38 30 39 void 40 SemanticError::append( SemanticError &other ) 41 { 42 errors.splice( errors.end(), other.errors ); 31 void SemanticError::append( SemanticError &other ) { 32 errors.splice( errors.end(), other.errors ); 43 33 } 44 34 45 bool 46 SemanticError::isEmpty() const 47 { 48 return errors.empty(); 35 bool SemanticError::isEmpty() const { 36 return errors.empty(); 49 37 } 50 38 51 void 52 SemanticError::print( std::ostream &os ) 53 { 54 std::copy( errors.begin(), errors.end(), std::ostream_iterator< std::string >( os, "\n" ) ); 39 void SemanticError::print( std::ostream &os ) { 40 std::copy( errors.begin(), errors.end(), std::ostream_iterator< std::string >( os, "\n" ) ); 55 41 } 42 56 43 // Local Variables: // 57 44 // tab-width: 4 //
Note: See TracChangeset
for help on using the changeset viewer.