Changes in src/Common/SemanticError.h [138e29e:fb114fa1]
- File:
-
- 1 edited
-
src/Common/SemanticError.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.h
r138e29e rfb114fa1 23 23 #include <iostream> 24 24 25 #include "utility.h"26 27 struct error {28 std::string description;29 CodeLocation location;30 31 error() = default;32 error( const std::string& str ) : description( str ) {}33 34 void maybeSet( const CodeLocation& location ) {35 if( this->location.linenumber < 0 ) {36 this->location = location;37 }38 }39 };40 41 25 class SemanticError : public std::exception { 42 26 public: … … 51 35 void print( std::ostream &os ); 52 36 53 void set_location( const CodeLocation& location );54 37 // constructs an exception using the given message and the printed 55 38 // representation of the obj (T must have a print method) 56 39 private: 57 std::list< error> errors;40 std::list< std::string > errors; 58 41 }; 59 42
Note:
See TracChangeset
for help on using the changeset viewer.