Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/SemanticError.h

    r138e29e rfb114fa1  
    2323#include <iostream>
    2424
    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 
    4125class SemanticError : public std::exception {
    4226  public:
     
    5135        void print( std::ostream &os );
    5236
    53         void set_location( const CodeLocation& location );
    5437        // constructs an exception using the given message and the printed
    5538        // representation of the obj (T must have a print method)
    5639  private:
    57         std::list< error > errors;
     40        std::list< std::string > errors;
    5841};
    5942
Note: See TracChangeset for help on using the changeset viewer.