Changeset 661e7b0 for src/Common
- Timestamp:
- Aug 13, 2024, 11:54:04 AM (14 months ago)
- Branches:
- master
- Children:
- 2870cb6, 4558df2
- Parents:
- 4941716
- Location:
- src/Common
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/CodeLocation.hpp
r4941716 r661e7b0 17 17 18 18 #include <iostream> 19 #include <string>19 #include "Symbol.hpp" 20 20 21 21 struct CodeLocation { 22 22 int first_line = -1, first_column = -1, last_line = -1, last_column = -1; 23 std::stringfilename = "";23 Symbol filename = ""; 24 24 25 25 /// Create a new unset CodeLocation. … … 46 46 47 47 bool startsBefore( CodeLocation const & other ) const { 48 if( filename < other.filename) return true;49 if( filename > other.filename) return false;48 if( filename.str() < other.filename.str() ) return true; 49 if( filename.str() > other.filename.str() ) return false; 50 50 51 51 if( first_line < other.first_line ) return true; … … 72 72 inline std::ostream & operator<<( std::ostream & out, const CodeLocation & location ) { 73 73 // Column number ":1" allows IDEs to parse the error message and position the cursor in the source text. 74 return location.isSet() ? out << location.filename << ":" << location.first_line << ":1 " : out;74 return location.isSet() ? out << location.filename.str() << ":" << location.first_line << ":1 " : out; 75 75 } -
src/Common/module.mk
r4941716 r661e7b0 48 48 Common/Stats/Time.cpp \ 49 49 Common/Stats/Time.hpp \ 50 Common/Symbol.cpp \ 51 Common/Symbol.hpp \ 50 52 Common/ToString.hpp \ 51 53 Common/UniqueName.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.