Changeset 6611177 for src/Parser/DeclarationNode.h
- Timestamp:
- Apr 11, 2023, 12:48:03 PM (14 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 5541a44e
- Parents:
- 9921573
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.h
r9921573 r6611177 180 180 template<typename AstType, typename NodeType, 181 181 template<typename, typename...> class Container, typename... Args> 182 void buildList( constNodeType * firstNode,182 void buildList( NodeType * firstNode, 183 183 Container<ast::ptr<AstType>, Args...> & output ) { 184 184 SemanticErrorException errors; 185 185 std::back_insert_iterator<Container<ast::ptr<AstType>, Args...>> out( output ); 186 constNodeType * cur = firstNode;186 NodeType * cur = firstNode; 187 187 188 188 while ( cur ) { … … 197 197 errors.append( e ); 198 198 } // try 199 constParseNode * temp = cur->get_next();199 ParseNode * temp = cur->get_next(); 200 200 // Should not return nullptr, then it is non-homogeneous: 201 cur = dynamic_cast< constNodeType *>( temp );201 cur = dynamic_cast<NodeType *>( temp ); 202 202 if ( !cur && temp ) { 203 203 SemanticError( temp->location, "internal error, non-homogeneous nodes founds in buildList processing." ); … … 209 209 } 210 210 211 void buildList( constDeclarationNode * firstNode, std::vector<ast::ptr<ast::Decl>> & outputList );212 void buildList( constDeclarationNode * firstNode, std::vector<ast::ptr<ast::DeclWithType>> & outputList );211 void buildList( DeclarationNode * firstNode, std::vector<ast::ptr<ast::Decl>> & outputList ); 212 void buildList( DeclarationNode * firstNode, std::vector<ast::ptr<ast::DeclWithType>> & outputList ); 213 213 void buildTypeList( const DeclarationNode * firstNode, std::vector<ast::ptr<ast::Type>> & outputList ); 214 214 215 215 template<typename AstType, typename NodeType, 216 216 template<typename, typename...> class Container, typename... Args> 217 void buildMoveList( constNodeType * firstNode,218 Container<ast::ptr<AstType>, Args...> & output ) {219 buildList<AstType, NodeType, Container, Args...>( firstNode, output );220 delete firstNode;217 void buildMoveList( NodeType * firstNode, 218 Container<ast::ptr<AstType>, Args...> & output ) { 219 buildList<AstType, NodeType, Container, Args...>( firstNode, output ); 220 delete firstNode; 221 221 }
Note: See TracChangeset
for help on using the changeset viewer.