Changes in src/Parser/RunParser.cpp [c468150:64b3cda]
- File:
-
- 1 edited
-
src/Parser/RunParser.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/RunParser.cpp
rc468150 r64b3cda 10 10 // Created On : Mon Dec 19 11:00:00 2022 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Mar 6 9:42:00 202313 // Update Count : 312 // Last Modified On : Thr Dec 22 10:18:00 2022 13 // Update Count : 1 14 14 // 15 15 … … 20 20 #include "CodeTools/TrackLoc.h" // for fillLocations 21 21 #include "Common/CodeLocationTools.hpp" // for forceFillCodeLocations 22 #include "Parser/ DeclarationNode.h"// for DeclarationNode, buildList22 #include "Parser/ParseNode.h" // for DeclarationNode, buildList 23 23 #include "Parser/TypedefTable.h" // for TypedefTable 24 24 25 25 // Variables global to the parsing code. 26 ast::Linkage::Spec linkage = ast::Linkage::Cforall;26 LinkageSpec::Spec linkage = LinkageSpec::Cforall; 27 27 TypedefTable typedefTable; 28 28 DeclarationNode * parseTree = nullptr; 29 29 30 void parse( FILE * input, ast::Linkage::Spec linkage, bool alwaysExit ) {30 void parse( FILE * input, LinkageSpec::Spec linkage, bool alwaysExit ) { 31 31 extern int yyparse( void ); 32 32 extern FILE * yyin; … … 46 46 47 47 ast::TranslationUnit buildUnit(void) { 48 std::vector<ast::ptr<ast::Decl>> decls; 49 buildList( parseTree, decls ); 48 std::list<Declaration *> translationUnit; 49 buildList( parseTree, translationUnit ); 50 50 51 delete parseTree; 51 52 parseTree = nullptr; 52 53 53 ast::TranslationUnit transUnit; 54 for ( auto decl : decls ) { 55 transUnit.decls.emplace_back( std::move( decl ) ); 56 } 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 ); 57 60 return transUnit; 58 61 }
Note:
See TracChangeset
for help on using the changeset viewer.