ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
ctor
deferred_resn
demangler
enum
forall-pointer-decay
gc_noraii
jacob/cs343-translation
jenkins-sandbox
memory
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
string
with_gc
Last change
on this file since 643a2e1 was 51b73452, checked in by Peter A. Buhr <pabuhr@…>, 11 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 |
|
---|
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.