Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r112fe04 r746ae82  
    1616#include "Convert.hpp"
    1717
     18#include <unordered_map>
     19
    1820#include "AST/Attribute.hpp"
    1921#include "AST/Decl.hpp"
     
    4244class ConverterNewToOld : public ast::Visitor {
    4345        BaseSyntaxNode * node = nullptr;
     46        using Cache = std::unordered_map< const ast::Node *, BaseSyntaxNode * >;
     47        Cache cache;
    4448
    4549        template<typename T>
     
    4751                ConverterNewToOld & visitor;
    4852
    49                 template<typename U>
    50                 T * accept1( const ast::ptr<U> & ptr ) {
     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;
    5156                        ptr->accept( visitor );
    5257                        T * ret = strict_dynamic_cast< T * >( visitor.node );
     
    8590                }
    8691                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;
    87103        }
    88104
     
    112128                decl->isDeleted = node->isDeleted;
    113129                // fs comes from constructor
     130                cache.emplace( node, decl );
    114131                return nullptr;
    115132        }
    116133
    117134        const ast::DeclWithType * visit( const ast::ObjectDecl * node ) override final {
     135                if ( inCache( node ) ) return nullptr;
    118136                auto decl = new ObjectDecl(
    119137                        node->name,
     
    130148
    131149        const ast::DeclWithType * visit( const ast::FunctionDecl * node ) override final {
     150                if ( inCache( node ) ) return nullptr;
    132151                auto decl = new FunctionDecl(
    133152                        node->name,
     
    153172
    154173        const ast::Decl * visit( const ast::TypeDecl * node ) override final {
    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                 };
     174                if ( inCache( node ) ) return nullptr;
    169175                auto decl = new TypeDecl(
    170176                        node->name,
    171177                        Type::StorageClasses( node->storage.val ),
    172178                        get<Type>().accept1( node->base ),
    173                         kind,
     179                        (TypeDecl::Kind)(unsigned)node->kind,
    174180                        node->sized,
    175181                        get<Type>().accept1( node->init )
    176182                );
     183                cache.emplace( node, decl );
    177184                return namedTypePostamble( decl, node );
    178185        }
     
    194201                decl->body = node->body;
    195202                // attributes come from constructor
    196                 // TODO: Need caching for: decl->parent = node->parent;
     203                decl->parent = get<AggregateDecl>().accept1( node->parent );
     204                cache.emplace( node, decl );
    197205                return nullptr;
    198206        }
    199207
    200208        const ast::Decl * visit( const ast::StructDecl * node ) override final {
     209                if ( inCache( node ) ) return nullptr;
    201210                auto decl = new StructDecl(
    202211                        node->name,
     
    209218
    210219        const ast::Decl * visit( const ast::UnionDecl * node ) override final {
     220                if ( inCache( node ) ) return nullptr;
    211221                auto decl = new UnionDecl(
    212222                        node->name,
     
    218228
    219229        const ast::Decl * visit( const ast::EnumDecl * node ) override final {
     230                if ( inCache( node ) ) return nullptr;
    220231                auto decl = new EnumDecl(
    221232                        node->name,
     
    227238
    228239        const ast::Decl * visit( const ast::TraitDecl * node ) override final {
     240                if ( inCache( node ) ) return nullptr;
    229241                auto decl = new TraitDecl(
    230242                        node->name,
     
    729741
    730742        const ast::Type * visit( const ast::VoidType * node ) override final {
    731                 (void)node;
     743                this->node = new VoidType{ cv( node ) };
    732744                return nullptr;
    733745        }
    734746
    735747        const ast::Type * visit( const ast::BasicType * node ) override final {
    736                 (void)node;
     748                this->node = new BasicType{ cv( node ), (BasicType::Kind)(unsigned)node->kind };
    737749                return nullptr;
    738750        }
    739751
    740752        const ast::Type * visit( const ast::PointerType * node ) override final {
    741                 (void)node;
     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                };
    742760                return nullptr;
    743761        }
    744762
    745763        const ast::Type * visit( const ast::ArrayType * node ) override final {
    746                 (void)node;
     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                };
    747771                return nullptr;
    748772        }
    749773
    750774        const ast::Type * visit( const ast::ReferenceType * node ) override final {
    751                 (void)node;
     775                this->node = new ReferenceType{
     776                        cv( node ),
     777                        get<Type>().accept1( node->base )
     778                };
    752779                return nullptr;
    753780        }
    754781
    755782        const ast::Type * visit( const ast::QualifiedType * node ) override final {
    756                 (void)node;
     783                this->node = new QualifiedType{
     784                        cv( node ),
     785                        get<Type>().accept1( node->parent ),
     786                        get<Type>().accept1( node->child )
     787                };
    757788                return nullptr;
    758789        }
    759790
    760791        const ast::Type * visit( const ast::FunctionType * node ) override final {
    761                 (void)node;
    762                 return nullptr;
     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;
    763807        }
    764808
    765809        const ast::Type * visit( const ast::StructInstType * node ) override final {
    766                 (void)node;
     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;
    767826                return nullptr;
    768827        }
    769828
    770829        const ast::Type * visit( const ast::UnionInstType * node ) override final {
    771                 (void)node;
     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;
    772846                return nullptr;
    773847        }
    774848
    775849        const ast::Type * visit( const ast::EnumInstType * node ) override final {
    776                 (void)node;
     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;
    777866                return nullptr;
    778867        }
    779868
    780869        const ast::Type * visit( const ast::TraitInstType * node ) override final {
    781                 (void)node;
     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;
    782886                return nullptr;
    783887        }
    784888
    785889        const ast::Type * visit( const ast::TypeInstType * node ) override final {
    786                 (void)node;
     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;
    787908                return nullptr;
    788909        }
    789910
    790911        const ast::Type * visit( const ast::TupleType * node ) override final {
    791                 (void)node;
     912                this->node = new TupleType{
     913                        cv( node ),
     914                        get<Type>().acceptL( node->types )
     915                        // members generated by TupleType c'tor
     916                };
    792917                return nullptr;
    793918        }
    794919
    795920        const ast::Type * visit( const ast::TypeofType * node ) override final {
    796                 (void)node;
     921                this->node = new TypeofType{
     922                        cv( node ),
     923                        get<Expression>().accept1( node->expr ),
     924                        (bool)node->kind
     925                };
    797926                return nullptr;
    798927        }
    799928
    800929        const ast::Type * visit( const ast::VarArgsType * node ) override final {
    801                 (void)node;
     930                this->node = new VarArgsType{ cv( node ) };
    802931                return nullptr;
    803932        }
    804933
    805934        const ast::Type * visit( const ast::ZeroType * node ) override final {
    806                 (void)node;
     935                this->node = new ZeroType{ cv( node ) };
    807936                return nullptr;
    808937        }
    809938
    810939        const ast::Type * visit( const ast::OneType * node ) override final {
    811                 (void)node;
    812                 return nullptr;
    813         }
    814 
    815         const ast::Type * visit( const ast::GlobalScopeType * node ) override final {
    816                 (void)node;
     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{};
    817946                return nullptr;
    818947        }
     
    867996        }
    868997private:
     998        /// conversion output
    869999        ast::Node * node;
     1000        /// cache of nodes that might be referenced by readonly<> for de-duplication
     1001        std::unordered_map< BaseSyntaxNode *, ast::Node * > cache;
    8701002
    8711003        // Local Utilities:
     
    8731005        template<typename NewT, typename OldT>
    8741006        NewT * getAccept1( OldT old ) {
     1007                if ( ! old ) return nullptr;
    8751008                old->accept(*this);
    8761009                return strict_dynamic_cast< NewT * >( node );
     
    9131046#       define GET_LABELS_V(labels) \
    9141047                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        }
    9151058
    9161059        // Now all the visit functions:
    9171060
    9181061        virtual void visit( ObjectDecl * old ) override final {
     1062                if ( inCache( old ) ) return;
    9191063                auto decl = new ast::ObjectDecl(
    9201064                        old->location,
     
    9331077                decl->uniqueId   = old->uniqueId;
    9341078                decl->extension  = old->extension;
     1079                cache.emplace( old, decl );
    9351080
    9361081                this->node = decl;
    9371082        }
    9381083
    939         virtual void visit( FunctionDecl * ) override final {
    940 
     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 );
    9411089        }
    9421090
    9431091        virtual void visit( StructDecl * old ) override final {
     1092                if ( inCache( old ) ) return;
    9441093                auto decl = new ast::StructDecl(
    9451094                        old->location,
     
    9561105                decl->uniqueId   = old->uniqueId;
    9571106                decl->storage    = { old->storageClasses.val };
     1107                cache.emplace( old, decl );
    9581108
    9591109                this->node = decl;
     
    9611111
    9621112        virtual void visit( UnionDecl * old ) override final {
     1113                if ( inCache( old ) ) return;
    9631114                auto decl = new ast::UnionDecl(
    9641115                        old->location,
     
    9741125                decl->uniqueId   = old->uniqueId;
    9751126                decl->storage    = { old->storageClasses.val };
     1127                cache.emplace( old, decl );
    9761128
    9771129                this->node = decl;
     
    9791131
    9801132        virtual void visit( EnumDecl * old ) override final {
     1133                if ( inCache( old ) ) return;
    9811134                auto decl = new ast::UnionDecl(
    9821135                        old->location,
     
    9921145                decl->uniqueId   = old->uniqueId;
    9931146                decl->storage    = { old->storageClasses.val };
     1147                cache.emplace( old, decl );
    9941148
    9951149                this->node = decl;
     
    9971151
    9981152        virtual void visit( TraitDecl * old ) override final {
     1153                if ( inCache( old ) ) return;
    9991154                auto decl = new ast::UnionDecl(
    10001155                        old->location,
     
    10101165                decl->uniqueId   = old->uniqueId;
    10111166                decl->storage    = { old->storageClasses.val };
     1167                cache.emplace( old, decl );
    10121168
    10131169                this->node = decl;
    10141170        }
    10151171
    1016         virtual void visit( TypeDecl * ) override final {
    1017 
     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 );
    10181177        }
    10191178
     
    15261685        }
    15271686
    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 
     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                };
    15821858        }
    15831859
    15841860        virtual void visit( AttrType * ) override final {
    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 
     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 ) };
    15981874        }
    15991875
    16001876        virtual void visit( GlobalScopeType * ) override final {
    1601 
     1877                this->node = new ast::GlobalScopeType{};
    16021878        }
    16031879
Note: See TracChangeset for help on using the changeset viewer.