Changes in src/Common/SemanticError.cc [9ed4f94:bf2438c]
- File:
-
- 1 edited
-
src/Common/SemanticError.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.cc
r9ed4f94 rbf2438c 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Aug 29 18:17:35 201713 // Update Count : 312 // Last Modified On : Tue May 19 07:21:25 2015 13 // Update Count : 1 14 14 // 15 15 16 #include <cstdio> // for fileno, stderr17 #include <unistd.h> // for isatty18 #include <iostream> // for basic_ostream, operator<<, ostream19 #include <list> // for list, _List_iterator20 #include <string> // for string, operator<<, operator+, to_string16 #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" // for to_string, CodeLocation (ptr only)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 } 24 29 25 30 SemanticError::SemanticError() { … … 44 49 void SemanticError::print( std::ostream &os ) { 45 50 using std::to_string; 46 for( auto err : errors) {47 os << to_string( err.location ) << err.description << std::endl;51 for(auto err : errors) { 52 os << to_string( err.location ) << err.description << '\n'; 48 53 } 49 54 }
Note:
See TracChangeset
for help on using the changeset viewer.