Changeset 138e29e for src/Common/SemanticError.h
- Timestamp:
- Feb 14, 2017, 3:53:52 PM (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:
- 9bb90a86
- Parents:
- 294647b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/SemanticError.h
r294647b r138e29e 25 25 #include "utility.h" 26 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 27 41 class SemanticError : public std::exception { 28 42 public: … … 41 55 // representation of the obj (T must have a print method) 42 56 private: 43 std::list< std::string > errors; 44 CodeLocation location; 57 std::list< error > errors; 45 58 }; 46 59
Note: See TracChangeset
for help on using the changeset viewer.