source: translator/Common/SemanticError.cc @ 5c7fb6c

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 5c7fb6c was 51b7345, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

initial commit

  • Property mode set to 100644
File size: 709 bytes
Line 
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
16SemanticError::SemanticError()
17{
18}
19
20SemanticError::SemanticError( std::string error )
21{
22  errors.push_back( std::string( "Error: " ) + error );
23}
24
25void
26SemanticError::append( SemanticError &other )
27{
28  errors.splice( errors.end(), other.errors );
29}
30
31bool
32SemanticError::isEmpty() const
33{
34  return errors.empty();
35}
36
37void
38SemanticError::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.