Changes in src/Parser/RunParser.cpp [cbd1ba8:64b3cda]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/RunParser.cpp
rcbd1ba8 r64b3cda 10 10 // Created On : Mon Dec 19 11:00:00 2022 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Dec 19 11:15:00 202213 // Update Count : 012 // Last Modified On : Thr Dec 22 10:18:00 2022 13 // Update Count : 1 14 14 // 15 15 16 16 #include "RunParser.hpp" 17 17 18 #include "AST/Convert.hpp" // for convert 19 #include "AST/TranslationUnit.hpp" // for TranslationUnit 20 #include "CodeTools/TrackLoc.h" // for fillLocations 21 #include "Common/CodeLocationTools.hpp" // for forceFillCodeLocations 18 22 #include "Parser/ParseNode.h" // for DeclarationNode, buildList 19 23 #include "Parser/TypedefTable.h" // for TypedefTable … … 41 45 } // parse 42 46 43 void dumpParseTree( std::ostream & out ) { 44 parseTree->printList( out ); 45 delete parseTree; 46 parseTree = nullptr; 47 } 48 49 std::list<Declaration *> buildUnit(void) { 47 ast::TranslationUnit buildUnit(void) { 50 48 std::list<Declaration *> translationUnit; 51 49 buildList( parseTree, translationUnit ); … … 54 52 parseTree = nullptr; 55 53 56 return translationUnit; 54 // When the parse/buildList code is translated to the new ast, these 55 // fill passes (and the one after 'Hoist Type Decls') should be redundent 56 // because the code locations should already be filled. 57 CodeTools::fillLocations( translationUnit ); 58 ast::TranslationUnit transUnit = convert( std::move( translationUnit ) ); 59 forceFillCodeLocations( transUnit ); 60 return transUnit; 57 61 } 58 62
Note: See TracChangeset
for help on using the changeset viewer.