ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since b87a5ed was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
709 bytes
|
Rev | Line | |
---|
[51b7345] | 1 | /* |
---|
| 2 | * This file is part of the Cforall project |
---|
| 3 | * |
---|
| 4 | * $Id: SemanticError.cc,v 1.1 2002/04/27 19:57:10 rcbilson Exp $ |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include <iostream> |
---|
| 9 | #include <list> |
---|
| 10 | #include <string> |
---|
| 11 | #include <algorithm> |
---|
| 12 | #include <iterator> |
---|
| 13 | |
---|
| 14 | #include "SemanticError.h" |
---|
| 15 | |
---|
| 16 | SemanticError::SemanticError() |
---|
| 17 | { |
---|
| 18 | } |
---|
| 19 | |
---|
| 20 | SemanticError::SemanticError( std::string error ) |
---|
| 21 | { |
---|
| 22 | errors.push_back( std::string( "Error: " ) + error ); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | void |
---|
| 26 | SemanticError::append( SemanticError &other ) |
---|
| 27 | { |
---|
| 28 | errors.splice( errors.end(), other.errors ); |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | bool |
---|
| 32 | SemanticError::isEmpty() const |
---|
| 33 | { |
---|
| 34 | return errors.empty(); |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | void |
---|
| 38 | SemanticError::print( std::ostream &os ) |
---|
| 39 | { |
---|
| 40 | std::copy( errors.begin(), errors.end(), std::ostream_iterator< std::string >( os, "\n" ) ); |
---|
| 41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.