Changeset b3f252a for src/Common/SemanticError.cc
- Timestamp:
- Sep 7, 2017, 10:36:35 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- e0886db
- Parents:
- 871cdb4 (diff), 416cc86 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.cc
r871cdb4 rb3f252a 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 19 07:21:25 201513 // Update Count : 112 // Last Modified On : Tue Aug 29 18:17:35 2017 13 // Update Count : 3 14 14 // 15 15 16 #include <cstdio> 17 #include <unistd.h> 18 #include <iostream> 19 #include <list> 20 #include <string> 16 #include <cstdio> // for fileno, stderr 17 #include <unistd.h> // for isatty 18 #include <iostream> // for basic_ostream, operator<<, ostream 19 #include <list> // for list, _List_iterator 20 #include <string> // for string, operator<<, operator+, to_string 21 21 22 #include "Common/utility.h" 22 #include "Common/utility.h" // for to_string, CodeLocation (ptr only) 23 23 #include "SemanticError.h" 24 25 inline const std::string& error_str() {26 static std::string str = isatty( fileno(stderr) ) ? "\e[31merror:\e[39m " : "error: ";27 return str;28 }29 24 30 25 SemanticError::SemanticError() { … … 49 44 void SemanticError::print( std::ostream &os ) { 50 45 using std::to_string; 51 for( auto err : errors) {52 os << to_string( err.location ) << err.description << '\n';46 for( auto err : errors ) { 47 os << to_string( err.location ) << err.description << std::endl; 53 48 } 54 49 }
Note: See TracChangeset
for help on using the changeset viewer.