Changeset f4e01f1 for src/AST/Pass.proto.hpp
- Timestamp:
- May 17, 2023, 4:27:25 PM (2 years ago)
- Branches:
- ADT
- Children:
- 3a513d89
- Parents:
- d6c464d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.proto.hpp
rd6c464d rf4e01f1 430 430 431 431 template<typename core_t> 432 static inline auto addAdtFwd( core_t & core, int, const ast::AdtDecl * decl ) -> decltype( core.symtab.addAdt( decl ), void() ) { 433 ast::AdtDecl * fwd = new ast::AdtDecl( decl->location, decl->name ); 434 for ( const auto & param : decl->params ) { 435 fwd->params.push_back( deepCopy( param.get() ) ); 436 } 437 // Experimental 438 for ( const auto & ctor : decl->data_constructors ) { 439 addStructFwd( core, 0, ctor ); 440 } 441 core.symtab.addAdt( fwd ); 442 } 443 444 template<typename core_t> 445 static inline auto addAdtFwd( core_t &, long, const ast::AdtDecl) {} 446 447 template<typename core_t> 432 448 static inline auto addStruct( core_t & core, int, const std::string & str ) -> decltype( core.symtab.addStruct( str ), void() ) { 433 449 if ( ! core.symtab.lookupStruct( str ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.