Changes in / [ed5e798:28c89f4]


Ignore:
Location:
src/AST
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    red5e798 r28c89f4  
    948948                        get<Type>().accept1( node->base ),
    949949                        get<Expression>().accept1( node->dimension ),
    950                         (bool)node->isVarLen,
    951                         (bool)node->isStatic
     950                        node->isVarLen,
     951                        node->isStatic
    952952                };
    953953                return nullptr;
     
    959959                        get<Type>().accept1( node->base ),
    960960                        get<Expression>().accept1( node->dimension ),
    961                         (bool)node->isVarLen,
    962                         (bool)node->isStatic
     961                        node->isVarLen,
     962                        node->isStatic
    963963                };
    964964                return nullptr;
     
    983983
    984984        const ast::Type * visit( const ast::FunctionType * node ) override final {
    985                 auto ty = new FunctionType {
    986                         cv( node ),
    987                         (bool)node->isVarArgs
    988                 };
     985                auto ty = new FunctionType { cv( node ), node->isVarArgs };
    989986                ty->returnVals = get<DeclarationWithType>().acceptL( node->returns );
    990987                ty->parameters = get<DeclarationWithType>().acceptL( node->params );
     
    11031100
    11041101        const ast::Type * visit( const ast::TupleType * node ) override final {
    1105                 this->node = new TupleType{
    1106                         cv( node ),
    1107                         get<Type>().acceptL( node->types )
    1108                         // members generated by TupleType c'tor
    1109                 };
     1102                (void)node;
    11101103                return nullptr;
    11111104        }
    11121105
    11131106        const ast::Type * visit( const ast::TypeofType * node ) override final {
    1114                 this->node = new TypeofType{
    1115                         cv( node ),
    1116                         get<Expression>().accept1( node->expr ),
    1117                         (bool)node->kind
    1118                 };
     1107                (void)node;
    11191108                return nullptr;
    11201109        }
    11211110
    11221111        const ast::Type * visit( const ast::VarArgsType * node ) override final {
    1123                 this->node = new VarArgsType{ cv( node ) };
     1112                (void)node;
    11241113                return nullptr;
    11251114        }
    11261115
    11271116        const ast::Type * visit( const ast::ZeroType * node ) override final {
    1128                 this->node = new ZeroType{ cv( node ) };
     1117                (void)node;
    11291118                return nullptr;
    11301119        }
    11311120
    11321121        const ast::Type * visit( const ast::OneType * node ) override final {
    1133                 this->node = new OneType{ cv( node ) };
    1134                 return nullptr;
    1135         }
    1136 
    1137         const ast::Type * visit( const ast::GlobalScopeType * ) override final {
    1138                 this->node = new GlobalScopeType{};
     1122                (void)node;
     1123                return nullptr;
     1124        }
     1125
     1126        const ast::Type * visit( const ast::GlobalScopeType * node ) override final {
     1127                (void)node;
    11391128                return nullptr;
    11401129        }
     
    22262215        }
    22272216
    2228         virtual void visit( TupleType * old ) override final {
    2229                 this->node = new ast::TupleType{
    2230                         GET_ACCEPT_V( types, Type ),
    2231                         // members generated by TupleType c'tor
    2232                         cv( old )
    2233                 };
    2234         }
    2235 
    2236         virtual void visit( TypeofType * old ) override final {
    2237                 this->node = new ast::TypeofType{
    2238                         GET_ACCEPT_1( expr, Expr ),
    2239                         (ast::TypeofType::Kind)old->is_basetypeof,
    2240                         cv( old )
    2241                 };
     2217        virtual void visit( TupleType * ) override final {
     2218
     2219        }
     2220
     2221        virtual void visit( TypeofType * ) override final {
     2222
    22422223        }
    22432224
    22442225        virtual void visit( AttrType * ) override final {
    2245                 assertf( false, "AttrType deprecated in new AST." );
    2246         }
    2247 
    2248         virtual void visit( VarArgsType * old ) override final {
    2249                 this->node = new ast::VarArgsType{ cv( old ) };
    2250         }
    2251 
    2252         virtual void visit( ZeroType * old ) override final {
    2253                 this->node = new ast::ZeroType{ cv( old ) };
    2254         }
    2255 
    2256         virtual void visit( OneType * old ) override final {
    2257                 this->node = new ast::OneType{ cv( old ) };
     2226
     2227        }
     2228
     2229        virtual void visit( VarArgsType * ) override final {
     2230
     2231        }
     2232
     2233        virtual void visit( ZeroType * ) override final {
     2234
     2235        }
     2236
     2237        virtual void visit( OneType * ) override final {
     2238
    22582239        }
    22592240
    22602241        virtual void visit( GlobalScopeType * ) override final {
    2261                 this->node = new ast::GlobalScopeType{};
     2242
    22622243        }
    22632244
  • src/AST/Type.hpp

    red5e798 r28c89f4  
    514514class GlobalScopeType final : public Type {
    515515public:
    516         GlobalScopeType() : Type() {}
     516        GlobalScopeType( CV::Qualifiers q = {} ) : Type( q ) {}
    517517
    518518        const Type * accept( Visitor & v ) const override { return v.visit( this ); }
Note: See TracChangeset for help on using the changeset viewer.