Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r746ae82 r112fe04  
    1616#include "Convert.hpp"
    1717
    18 #include <unordered_map>
    19 
    2018#include "AST/Attribute.hpp"
    2119#include "AST/Decl.hpp"
     
    4442class ConverterNewToOld : public ast::Visitor {
    4543        BaseSyntaxNode * node = nullptr;
    46         using Cache = std::unordered_map< const ast::Node *, BaseSyntaxNode * >;
    47         Cache cache;
    4844
    4945        template<typename T>
     
    5147                ConverterNewToOld & visitor;
    5248
    53                 template<typename U, enum ast::Node::ref_type R>
    54                 T * accept1( const ast::ptr_base<U, R> & ptr ) {
    55                         if ( ! ptr ) return nullptr;
     49                template<typename U>
     50                T * accept1( const ast::ptr<U> & ptr ) {
    5651                        ptr->accept( visitor );
    5752                        T * ret = strict_dynamic_cast< T * >( visitor.node );
     
    9085                }
    9186                return ret;
    92         }
    93 
    94         /// get new qualifiers from old type
    95         Type::Qualifiers cv( const ast::Type * ty ) { return { ty->qualifiers.val }; }
    96 
    97         /// returns true and sets `node` if in cache
    98         bool inCache( const ast::Node * node ) {
    99                 auto it = cache.find( node );
    100                 if ( it == cache.end() ) return false;
    101                 this->node = it->second;
    102                 return true;
    10387        }
    10488
     
    128112                decl->isDeleted = node->isDeleted;
    129113                // fs comes from constructor
    130                 cache.emplace( node, decl );
    131114                return nullptr;
    132115        }
    133116
    134117        const ast::DeclWithType * visit( const ast::ObjectDecl * node ) override final {
    135                 if ( inCache( node ) ) return nullptr;
    136118                auto decl = new ObjectDecl(
    137119                        node->name,
     
    148130
    149131        const ast::DeclWithType * visit( const ast::FunctionDecl * node ) override final {
    150                 if ( inCache( node ) ) return nullptr;
    151132                auto decl = new FunctionDecl(
    152133                        node->name,
     
    172153
    173154        const ast::Decl * visit( const ast::TypeDecl * node ) override final {
    174                 if ( inCache( node ) ) return nullptr;
     155                TypeDecl::Kind kind;
     156                switch (node->kind) {
     157                case ast::TypeVar::Dtype:
     158                        kind = TypeDecl::Dtype;
     159                        break;
     160                case ast::TypeVar::Ftype:
     161                        kind = TypeDecl::Ftype;
     162                        break;
     163                case ast::TypeVar::Ttype:
     164                        kind = TypeDecl::Ttype;
     165                        break;
     166                default:
     167                        assertf(false, "Invalid ast::TypeVar::Kind: %d\n", node->kind);
     168                };
    175169                auto decl = new TypeDecl(
    176170                        node->name,
    177171                        Type::StorageClasses( node->storage.val ),
    178172                        get<Type>().accept1( node->base ),
    179                         (TypeDecl::Kind)(unsigned)node->kind,
     173                        kind,
    180174                        node->sized,
    181175                        get<Type>().accept1( node->init )
    182176                );
    183                 cache.emplace( node, decl );
    184177                return namedTypePostamble( decl, node );
    185178        }
     
    201194                decl->body = node->body;
    202195                // attributes come from constructor
    203                 decl->parent = get<AggregateDecl>().accept1( node->parent );
    204                 cache.emplace( node, decl );
     196                // TODO: Need caching for: decl->parent = node->parent;
    205197                return nullptr;
    206198        }
    207199
    208200        const ast::Decl * visit( const ast::StructDecl * node ) override final {
    209                 if ( inCache( node ) ) return nullptr;
    210201                auto decl = new StructDecl(
    211202                        node->name,
     
    218209
    219210        const ast::Decl * visit( const ast::UnionDecl * node ) override final {
    220                 if ( inCache( node ) ) return nullptr;
    221211                auto decl = new UnionDecl(
    222212                        node->name,
     
    228218
    229219        const ast::Decl * visit( const ast::EnumDecl * node ) override final {
    230                 if ( inCache( node ) ) return nullptr;
    231220                auto decl = new EnumDecl(
    232221                        node->name,
     
    238227
    239228        const ast::Decl * visit( const ast::TraitDecl * node ) override final {
    240                 if ( inCache( node ) ) return nullptr;
    241229                auto decl = new TraitDecl(
    242230                        node->name,
     
    741729
    742730        const ast::Type * visit( const ast::VoidType * node ) override final {
    743                 this->node = new VoidType{ cv( node ) };
     731                (void)node;
    744732                return nullptr;
    745733        }
    746734
    747735        const ast::Type * visit( const ast::BasicType * node ) override final {
    748                 this->node = new BasicType{ cv( node ), (BasicType::Kind)(unsigned)node->kind };
     736                (void)node;
    749737                return nullptr;
    750738        }
    751739
    752740        const ast::Type * visit( const ast::PointerType * node ) override final {
    753                 this->node = new PointerType{
    754                         cv( node ),
    755                         get<Type>().accept1( node->base ),
    756                         get<Expression>().accept1( node->dimension ),
    757                         (bool)node->isVarLen,
    758                         (bool)node->isStatic
    759                 };
     741                (void)node;
    760742                return nullptr;
    761743        }
    762744
    763745        const ast::Type * visit( const ast::ArrayType * node ) override final {
    764                 this->node = new ArrayType{
    765                         cv( node ),
    766                         get<Type>().accept1( node->base ),
    767                         get<Expression>().accept1( node->dimension ),
    768                         (bool)node->isVarLen,
    769                         (bool)node->isStatic
    770                 };
     746                (void)node;
    771747                return nullptr;
    772748        }
    773749
    774750        const ast::Type * visit( const ast::ReferenceType * node ) override final {
    775                 this->node = new ReferenceType{
    776                         cv( node ),
    777                         get<Type>().accept1( node->base )
    778                 };
     751                (void)node;
    779752                return nullptr;
    780753        }
    781754
    782755        const ast::Type * visit( const ast::QualifiedType * node ) override final {
    783                 this->node = new QualifiedType{
    784                         cv( node ),
    785                         get<Type>().accept1( node->parent ),
    786                         get<Type>().accept1( node->child )
    787                 };
     756                (void)node;
    788757                return nullptr;
    789758        }
    790759
    791760        const ast::Type * visit( const ast::FunctionType * node ) override final {
    792                 auto ty = new FunctionType {
    793                         cv( node ),
    794                         (bool)node->isVarArgs
    795                 };
    796                 ty->returnVals = get<DeclarationWithType>().acceptL( node->returns );
    797                 ty->parameters = get<DeclarationWithType>().acceptL( node->params );
    798                 ty->forall = get<TypeDecl>().acceptL( node->forall );
    799                 this->node = ty;
    800                 return nullptr;
    801         }
    802 
    803         void postvisit( const ast::ReferenceToType * old, ReferenceToType * ty ) {
    804                 ty->forall = get<TypeDecl>().acceptL( old->forall );
    805                 ty->parameters = get<Expression>().acceptL( old->params );
    806                 ty->hoistType = old->hoistType;
     761                (void)node;
     762                return nullptr;
    807763        }
    808764
    809765        const ast::Type * visit( const ast::StructInstType * node ) override final {
    810                 StructInstType * ty;
    811                 if ( node->base ) {
    812                         ty = new StructInstType{
    813                                 cv( node ),
    814                                 get<StructDecl>().accept1( node->base ),
    815                                 get<Attribute>().acceptL( node->attributes )
    816                         };
    817                 } else {
    818                         ty = new StructInstType{
    819                                 cv( node ),
    820                                 node->name,
    821                                 get<Attribute>().acceptL( node->attributes )
    822                         };
    823                 }
    824                 postvisit( node, ty );
    825                 this->node = ty;
     766                (void)node;
    826767                return nullptr;
    827768        }
    828769
    829770        const ast::Type * visit( const ast::UnionInstType * node ) override final {
    830                 UnionInstType * ty;
    831                 if ( node->base ) {
    832                         ty = new UnionInstType{
    833                                 cv( node ),
    834                                 get<UnionDecl>().accept1( node->base ),
    835                                 get<Attribute>().acceptL( node->attributes )
    836                         };
    837                 } else {
    838                         ty = new UnionInstType{
    839                                 cv( node ),
    840                                 node->name,
    841                                 get<Attribute>().acceptL( node->attributes )
    842                         };
    843                 }
    844                 postvisit( node, ty );
    845                 this->node = ty;
     771                (void)node;
    846772                return nullptr;
    847773        }
    848774
    849775        const ast::Type * visit( const ast::EnumInstType * node ) override final {
    850                 EnumInstType * ty;
    851                 if ( node->base ) {
    852                         ty = new EnumInstType{
    853                                 cv( node ),
    854                                 get<EnumDecl>().accept1( node->base ),
    855                                 get<Attribute>().acceptL( node->attributes )
    856                         };
    857                 } else {
    858                         ty = new EnumInstType{
    859                                 cv( node ),
    860                                 node->name,
    861                                 get<Attribute>().acceptL( node->attributes )
    862                         };
    863                 }
    864                 postvisit( node, ty );
    865                 this->node = ty;
     776                (void)node;
    866777                return nullptr;
    867778        }
    868779
    869780        const ast::Type * visit( const ast::TraitInstType * node ) override final {
    870                 TraitInstType * ty;
    871                 if ( node->base ) {
    872                         ty = new TraitInstType{
    873                                 cv( node ),
    874                                 get<TraitDecl>().accept1( node->base ),
    875                                 get<Attribute>().acceptL( node->attributes )
    876                         };
    877                 } else {
    878                         ty = new TraitInstType{
    879                                 cv( node ),
    880                                 node->name,
    881                                 get<Attribute>().acceptL( node->attributes )
    882                         };
    883                 }
    884                 postvisit( node, ty );
    885                 this->node = ty;
     781                (void)node;
    886782                return nullptr;
    887783        }
    888784
    889785        const ast::Type * visit( const ast::TypeInstType * node ) override final {
    890                 TypeInstType * ty;
    891                 if ( node->base ) {
    892                         ty = new TypeInstType{
    893                                 cv( node ),
    894                                 node->name,
    895                                 get<TypeDecl>().accept1( node->base ),
    896                                 get<Attribute>().acceptL( node->attributes )
    897                         };
    898                 } else {
    899                         ty = new TypeInstType{
    900                                 cv( node ),
    901                                 node->name,
    902                                 node->kind == ast::TypeVar::Ftype,
    903                                 get<Attribute>().acceptL( node->attributes )
    904                         };
    905                 }
    906                 postvisit( node, ty );
    907                 this->node = ty;
     786                (void)node;
    908787                return nullptr;
    909788        }
    910789
    911790        const ast::Type * visit( const ast::TupleType * node ) override final {
    912                 this->node = new TupleType{
    913                         cv( node ),
    914                         get<Type>().acceptL( node->types )
    915                         // members generated by TupleType c'tor
    916                 };
     791                (void)node;
    917792                return nullptr;
    918793        }
    919794
    920795        const ast::Type * visit( const ast::TypeofType * node ) override final {
    921                 this->node = new TypeofType{
    922                         cv( node ),
    923                         get<Expression>().accept1( node->expr ),
    924                         (bool)node->kind
    925                 };
     796                (void)node;
    926797                return nullptr;
    927798        }
    928799
    929800        const ast::Type * visit( const ast::VarArgsType * node ) override final {
    930                 this->node = new VarArgsType{ cv( node ) };
     801                (void)node;
    931802                return nullptr;
    932803        }
    933804
    934805        const ast::Type * visit( const ast::ZeroType * node ) override final {
    935                 this->node = new ZeroType{ cv( node ) };
     806                (void)node;
    936807                return nullptr;
    937808        }
    938809
    939810        const ast::Type * visit( const ast::OneType * node ) override final {
    940                 this->node = new OneType{ cv( node ) };
    941                 return nullptr;
    942         }
    943 
    944         const ast::Type * visit( const ast::GlobalScopeType * ) override final {
    945                 this->node = new GlobalScopeType{};
     811                (void)node;
     812                return nullptr;
     813        }
     814
     815        const ast::Type * visit( const ast::GlobalScopeType * node ) override final {
     816                (void)node;
    946817                return nullptr;
    947818        }
     
    996867        }
    997868private:
    998         /// conversion output
    999869        ast::Node * node;
    1000         /// cache of nodes that might be referenced by readonly<> for de-duplication
    1001         std::unordered_map< BaseSyntaxNode *, ast::Node * > cache;
    1002870
    1003871        // Local Utilities:
     
    1005873        template<typename NewT, typename OldT>
    1006874        NewT * getAccept1( OldT old ) {
    1007                 if ( ! old ) return nullptr;
    1008875                old->accept(*this);
    1009876                return strict_dynamic_cast< NewT * >( node );
     
    1046913#       define GET_LABELS_V(labels) \
    1047914                to<std::vector>::from( make_labels( std::move( labels ) ) )
    1048        
    1049         static ast::CV::Qualifiers cv( Type * ty ) { return { ty->get_qualifiers().val }; }
    1050 
    1051         /// returns true and sets `node` if in cache
    1052         bool inCache( BaseSyntaxNode * old ) {
    1053                 auto it = cache.find( old );
    1054                 if ( it == cache.end() ) return false;
    1055                 node = it->second;
    1056                 return true;
    1057         }
    1058915
    1059916        // Now all the visit functions:
    1060917
    1061918        virtual void visit( ObjectDecl * old ) override final {
    1062                 if ( inCache( old ) ) return;
    1063919                auto decl = new ast::ObjectDecl(
    1064920                        old->location,
     
    1077933                decl->uniqueId   = old->uniqueId;
    1078934                decl->extension  = old->extension;
    1079                 cache.emplace( old, decl );
    1080935
    1081936                this->node = decl;
    1082937        }
    1083938
    1084         virtual void visit( FunctionDecl * old ) override final {
    1085                 if ( inCache( old ) ) return;
    1086                 // TODO
    1087                 auto decl = (ast::FunctionDecl *)nullptr;
    1088                 cache.emplace( old, decl );
     939        virtual void visit( FunctionDecl * ) override final {
     940
    1089941        }
    1090942
    1091943        virtual void visit( StructDecl * old ) override final {
    1092                 if ( inCache( old ) ) return;
    1093944                auto decl = new ast::StructDecl(
    1094945                        old->location,
     
    1105956                decl->uniqueId   = old->uniqueId;
    1106957                decl->storage    = { old->storageClasses.val };
    1107                 cache.emplace( old, decl );
    1108958
    1109959                this->node = decl;
     
    1111961
    1112962        virtual void visit( UnionDecl * old ) override final {
    1113                 if ( inCache( old ) ) return;
    1114963                auto decl = new ast::UnionDecl(
    1115964                        old->location,
     
    1125974                decl->uniqueId   = old->uniqueId;
    1126975                decl->storage    = { old->storageClasses.val };
    1127                 cache.emplace( old, decl );
    1128976
    1129977                this->node = decl;
     
    1131979
    1132980        virtual void visit( EnumDecl * old ) override final {
    1133                 if ( inCache( old ) ) return;
    1134981                auto decl = new ast::UnionDecl(
    1135982                        old->location,
     
    1145992                decl->uniqueId   = old->uniqueId;
    1146993                decl->storage    = { old->storageClasses.val };
    1147                 cache.emplace( old, decl );
    1148994
    1149995                this->node = decl;
     
    1151997
    1152998        virtual void visit( TraitDecl * old ) override final {
    1153                 if ( inCache( old ) ) return;
    1154999                auto decl = new ast::UnionDecl(
    11551000                        old->location,
     
    11651010                decl->uniqueId   = old->uniqueId;
    11661011                decl->storage    = { old->storageClasses.val };
    1167                 cache.emplace( old, decl );
    11681012
    11691013                this->node = decl;
    11701014        }
    11711015
    1172         virtual void visit( TypeDecl * old ) override final {
    1173                 if ( inCache( old ) ) return;
    1174                 // TODO
    1175                 auto decl = (ast::TypeDecl *)nullptr;
    1176                 cache.emplace( old, decl );
     1016        virtual void visit( TypeDecl * ) override final {
     1017
    11771018        }
    11781019
     
    16851526        }
    16861527
    1687         virtual void visit( VoidType * old ) override final {
    1688                 this->node = new ast::VoidType{ cv( old ) };
    1689         }
    1690 
    1691         virtual void visit( BasicType * old ) override final {
    1692                 this->node = new ast::BasicType{ (ast::BasicType::Kind)(unsigned)old->kind, cv( old ) };
    1693         }
    1694 
    1695         virtual void visit( PointerType * old ) override final {
    1696                 this->node = new ast::PointerType{
    1697                         GET_ACCEPT_1( base, Type ),
    1698                         GET_ACCEPT_1( dimension, Expr ),
    1699                         (ast::LengthFlag)old->isVarLen,
    1700                         (ast::DimensionFlag)old->isStatic,
    1701                         cv( old )
    1702                 };
    1703         }
    1704 
    1705         virtual void visit( ArrayType * old ) override final {
    1706                 this->node = new ast::ArrayType{
    1707                         GET_ACCEPT_1( base, Type ),
    1708                         GET_ACCEPT_1( dimension, Expr ),
    1709                         (ast::LengthFlag)old->isVarLen,
    1710                         (ast::DimensionFlag)old->isStatic,
    1711                         cv( old )
    1712                 };
    1713         }
    1714 
    1715         virtual void visit( ReferenceType * old ) override final {
    1716                 this->node = new ast::ReferenceType{
    1717                         GET_ACCEPT_1( base, Type ),
    1718                         cv( old )
    1719                 };
    1720         }
    1721 
    1722         virtual void visit( QualifiedType * old ) override final {
    1723                 this->node = new ast::QualifiedType{
    1724                         GET_ACCEPT_1( parent, Type ),
    1725                         GET_ACCEPT_1( child, Type ),
    1726                         cv( old )
    1727                 };
    1728         }
    1729 
    1730         virtual void visit( FunctionType * old ) override final {
    1731                 auto ty = new ast::FunctionType {
    1732                         (ast::ArgumentFlag)old->isVarArgs,
    1733                         cv( old )
    1734                 };
    1735                 ty->returns = GET_ACCEPT_V( returnVals, DeclWithType );
    1736                 ty->params = GET_ACCEPT_V( parameters, DeclWithType );
    1737                 ty->forall = GET_ACCEPT_V( forall, TypeDecl );
    1738                 this->node = ty;
    1739         }
    1740 
    1741         void postvisit( ReferenceToType * old, ast::ReferenceToType * ty ) {
    1742                 ty->forall = GET_ACCEPT_V( forall, TypeDecl );
    1743                 ty->params = GET_ACCEPT_V( parameters, Expr );
    1744                 ty->hoistType = old->hoistType;
    1745         }
    1746 
    1747         virtual void visit( StructInstType * old ) override final {
    1748                 ast::StructInstType * ty;
    1749                 if ( old->baseStruct ) {
    1750                         ty = new ast::StructInstType{
    1751                                 GET_ACCEPT_1( baseStruct, StructDecl ),
    1752                                 cv( old ),
    1753                                 GET_ACCEPT_V( attributes, Attribute )
    1754                         };
    1755                 } else {
    1756                         ty = new ast::StructInstType{
    1757                                 old->name,
    1758                                 cv( old ),
    1759                                 GET_ACCEPT_V( attributes, Attribute )
    1760                         };
    1761                 }
    1762                 postvisit( old, ty );
    1763                 this->node = ty;
    1764         }
    1765 
    1766         virtual void visit( UnionInstType * old ) override final {
    1767                 ast::UnionInstType * ty;
    1768                 if ( old->baseUnion ) {
    1769                         ty = new ast::UnionInstType{
    1770                                 GET_ACCEPT_1( baseUnion, UnionDecl ),
    1771                                 cv( old ),
    1772                                 GET_ACCEPT_V( attributes, Attribute )
    1773                         };
    1774                 } else {
    1775                         ty = new ast::UnionInstType{
    1776                                 old->name,
    1777                                 cv( old ),
    1778                                 GET_ACCEPT_V( attributes, Attribute )
    1779                         };
    1780                 }
    1781                 postvisit( old, ty );
    1782                 this->node = ty;
    1783         }
    1784 
    1785         virtual void visit( EnumInstType * old ) override final {
    1786                 ast::EnumInstType * ty;
    1787                 if ( old->baseEnum ) {
    1788                         ty = new ast::EnumInstType{
    1789                                 GET_ACCEPT_1( baseEnum, EnumDecl ),
    1790                                 cv( old ),
    1791                                 GET_ACCEPT_V( attributes, Attribute )
    1792                         };
    1793                 } else {
    1794                         ty = new ast::EnumInstType{
    1795                                 old->name,
    1796                                 cv( old ),
    1797                                 GET_ACCEPT_V( attributes, Attribute )
    1798                         };
    1799                 }
    1800                 postvisit( old, ty );
    1801                 this->node = ty;
    1802         }
    1803 
    1804         virtual void visit( TraitInstType * old ) override final {
    1805                 ast::TraitInstType * ty;
    1806                 if ( old->baseTrait ) {
    1807                         ty = new ast::TraitInstType{
    1808                                 GET_ACCEPT_1( baseTrait, TraitDecl ),
    1809                                 cv( old ),
    1810                                 GET_ACCEPT_V( attributes, Attribute )
    1811                         };
    1812                 } else {
    1813                         ty = new ast::TraitInstType{
    1814                                 old->name,
    1815                                 cv( old ),
    1816                                 GET_ACCEPT_V( attributes, Attribute )
    1817                         };
    1818                 }
    1819                 postvisit( old, ty );
    1820                 this->node = ty;
    1821         }
    1822 
    1823         virtual void visit( TypeInstType * old ) override final {
    1824                 ast::TypeInstType * ty;
    1825                 if ( old->baseType ) {
    1826                         ty = new ast::TypeInstType{
    1827                                 old->name,
    1828                                 GET_ACCEPT_1( baseType, TypeDecl ),
    1829                                 cv( old ),
    1830                                 GET_ACCEPT_V( attributes, Attribute )
    1831                         };
    1832                 } else {
    1833                         ty = new ast::TypeInstType{
    1834                                 old->name,
    1835                                 old->isFtype ? ast::TypeVar::Ftype : ast::TypeVar::Dtype,
    1836                                 cv( old ),
    1837                                 GET_ACCEPT_V( attributes, Attribute )
    1838                         };
    1839                 }
    1840                 postvisit( old, ty );
    1841                 this->node = ty;
    1842         }
    1843 
    1844         virtual void visit( TupleType * old ) override final {
    1845                 this->node = new ast::TupleType{
    1846                         GET_ACCEPT_V( types, Type ),
    1847                         // members generated by TupleType c'tor
    1848                         cv( old )
    1849                 };
    1850         }
    1851 
    1852         virtual void visit( TypeofType * old ) override final {
    1853                 this->node = new ast::TypeofType{
    1854                         GET_ACCEPT_1( expr, Expr ),
    1855                         (ast::TypeofType::Kind)old->is_basetypeof,
    1856                         cv( old )
    1857                 };
     1528        virtual void visit( VoidType * ) override final {
     1529
     1530        }
     1531
     1532        virtual void visit( BasicType * ) override final {
     1533
     1534        }
     1535
     1536        virtual void visit( PointerType * ) override final {
     1537
     1538        }
     1539
     1540        virtual void visit( ArrayType * ) override final {
     1541
     1542        }
     1543
     1544        virtual void visit( ReferenceType * ) override final {
     1545
     1546        }
     1547
     1548        virtual void visit( QualifiedType * ) override final {
     1549
     1550        }
     1551
     1552        virtual void visit( FunctionType * ) override final {
     1553
     1554        }
     1555
     1556        virtual void visit( StructInstType * ) override final {
     1557
     1558        }
     1559
     1560        virtual void visit( UnionInstType * ) override final {
     1561
     1562        }
     1563
     1564        virtual void visit( EnumInstType * ) override final {
     1565
     1566        }
     1567
     1568        virtual void visit( TraitInstType * ) override final {
     1569
     1570        }
     1571
     1572        virtual void visit( TypeInstType * ) override final {
     1573
     1574        }
     1575
     1576        virtual void visit( TupleType * ) override final {
     1577
     1578        }
     1579
     1580        virtual void visit( TypeofType * ) override final {
     1581
    18581582        }
    18591583
    18601584        virtual void visit( AttrType * ) override final {
    1861                 assertf( false, "AttrType deprecated in new AST." );
    1862         }
    1863 
    1864         virtual void visit( VarArgsType * old ) override final {
    1865                 this->node = new ast::VarArgsType{ cv( old ) };
    1866         }
    1867 
    1868         virtual void visit( ZeroType * old ) override final {
    1869                 this->node = new ast::ZeroType{ cv( old ) };
    1870         }
    1871 
    1872         virtual void visit( OneType * old ) override final {
    1873                 this->node = new ast::OneType{ cv( old ) };
     1585
     1586        }
     1587
     1588        virtual void visit( VarArgsType * ) override final {
     1589
     1590        }
     1591
     1592        virtual void visit( ZeroType * ) override final {
     1593
     1594        }
     1595
     1596        virtual void visit( OneType * ) override final {
     1597
    18741598        }
    18751599
    18761600        virtual void visit( GlobalScopeType * ) override final {
    1877                 this->node = new ast::GlobalScopeType{};
     1601
    18781602        }
    18791603
Note: See TracChangeset for help on using the changeset viewer.