Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeTools/TrackLoc.cc

    r3268a58 rbf2438c  
    1616#include "TrackLoc.h"
    1717
    18 #include <cstdlib>                   // for exit, EXIT_FAILURE
    19 #include <iostream>                  // for operator<<, ostream, basic_ostream
    20 #include <stack>                     // for stack
    21 #include <string>                    // for operator<<, string
    22 #include <typeindex>                 // for type_index
     18#include <cstdlib>                    // for size_t, exit, EXIT_FAILURE
     19#include <iostream>                   // for operator<<, ostream, basic_ostream
     20#include <iterator>                   // for back_inserter, inserter
     21#include <stack>                      // for stack
     22#include <string>                     // for operator<<, string
     23#include <typeindex>                  // for type_index
    2324
    24 #include "Common/PassVisitor.h"      // for PassVisitor
    25 #include "Common/utility.h"          // for CodeLocation
    26 #include "SynTree/BaseSyntaxNode.h"  // for BaseSyntaxNode
     25#include "Common/PassVisitor.h"       // for PassVisitor
     26#include "Common/PassVisitor.impl.h"  // for acceptAll
     27#include "Common/SemanticError.h"     // for SemanticError
     28#include "Common/utility.h"           // for CodeLocation
     29#include "SynTree/BaseSyntaxNode.h"   // for BaseSyntaxNode
     30#include "SynTree/Mutator.h"          // for mutateAll
     31#include "SynTree/Visitor.h"          // for acceptAll
    2732
    2833class Declaration;
     
    4146                std::stack< CodeLocation * > parents;
    4247        public:
    43                 LocationPrinter(size_t printLevel) :
     48                LocationPrinter(size_t printLevel) : 
    4449                        printLevel(printLevel), lastNode(nullptr)
    4550                {}
     
    6065                                if ( !parents.empty() ) {
    6166                                        node->location = *parents.top();
    62                                 }
     67                                } 
    6368                                else if (nullptr != lastNode) {
    6469                                        node->location = *lastNode;
    65                                 }
     70                                } 
    6671                                else {
    6772                                        std::cerr << "Top level node has no CodeLocation " << name << std::endl;
Note: See TracChangeset for help on using the changeset viewer.