Changeset 019b2d3 for src/Parser
- Timestamp:
- Dec 22, 2022, 3:17:52 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 64b3cda
- Parents:
- be3b952
- Location:
- src/Parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Parser/RunParser.cpp ¶
rbe3b952 r019b2d3 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 … … 47 51 } 48 52 49 std::list<Declaration *>buildUnit(void) {53 ast::TranslationUnit buildUnit(void) { 50 54 std::list<Declaration *> translationUnit; 51 55 buildList( parseTree, translationUnit ); … … 54 58 parseTree = nullptr; 55 59 56 return translationUnit; 60 // When the parse/buildList code is translated to the new ast, these 61 // fill passes (and the one after 'Hoist Type Decls') should be redundent 62 // because the code locations should already be filled. 63 CodeTools::fillLocations( translationUnit ); 64 ast::TranslationUnit transUnit = convert( std::move( translationUnit ) ); 65 forceFillCodeLocations( transUnit ); 66 return transUnit; 57 67 } 58 68 -
TabularUnified src/Parser/RunParser.hpp ¶
rbe3b952 r019b2d3 10 10 // Created On : Mon Dec 19 10:42: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:23:00 2022 13 // Update Count : 1 14 14 // 15 15 … … 17 17 18 18 #include <iosfwd> // for ostream 19 #include <list> // for list20 19 21 20 #include "SynTree/LinkageSpec.h" // for Spec 22 class Declaration; 21 namespace ast { 22 class TranslationUnit; 23 } 23 24 24 25 // The Parser does not have an enclosing namespace. … … 35 36 /// Drain the internal accumulator of parsed code and build a translation 36 37 /// unit from it. 37 std::list<Declaration *>buildUnit(void);38 ast::TranslationUnit buildUnit(void); 38 39 39 40 // Local Variables: //
Note: See TracChangeset
for help on using the changeset viewer.