Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.hpp

    r857b5f9 recf3812  
    490490};
    491491
     492class CountExpr final : public Expr {
     493public:
     494        ptr<Expr> expr;
     495        ptr<Type> type;
     496
     497        CountExpr( const CodeLocation & loc, const Expr * t );
     498        CountExpr( const CodeLocation & loc, const Type * t );
     499
     500        const Expr * accept( Visitor & v )const override { return v.visit( this ); }
     501private:
     502        CountExpr * clone() const override { return new CountExpr( *this ); }
     503        MUTATE_FRIEND
     504};
     505
    492506/// alignof expression, e.g. `alignof(int)`, `alignof 3+4`
    493507class AlignofExpr final : public Expr {
     
    500514private:
    501515        AlignofExpr * clone() const override { return new AlignofExpr{ *this }; }
    502         MUTATE_FRIEND
    503 };
    504 
    505 /// countof expression, e.g. `countof(AnEnum)`, `countof pred(Head)`
    506 class CountofExpr final : public Expr {
    507 public:
    508         ptr<Type> type;
    509 
    510         CountofExpr( const CodeLocation & loc, const Type * t );
    511 
    512         const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
    513 private:
    514         CountofExpr * clone() const override { return new CountofExpr( *this ); }
    515516        MUTATE_FRIEND
    516517};
Note: See TracChangeset for help on using the changeset viewer.