Ignore:
Timestamp:
Feb 2, 2016, 2:00:37 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
4789f44, b10c9959
Parents:
5721a6d
Message:

Make offsetof expressions work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r5721a6d r2a4b088  
    319319};
    320320
     321/// UntypedOffsetofExpr represents an offsetof expression before resolution
     322class UntypedOffsetofExpr : public Expression {
     323  public:
     324        UntypedOffsetofExpr( Type *type, const std::string &member, Expression *_aname = 0 );
     325        UntypedOffsetofExpr( const UntypedOffsetofExpr &other );
     326        virtual ~UntypedOffsetofExpr();
     327
     328        std::string get_member() const { return member; }
     329        void set_member( const std::string &newValue ) { member = newValue; }
     330        Type *get_type() const { return type; }
     331        void set_type( Type *newValue ) { type = newValue; }
     332
     333        virtual UntypedOffsetofExpr *clone() const { return new UntypedOffsetofExpr( *this ); }
     334        virtual void accept( Visitor &v ) { v.visit( this ); }
     335        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     336        virtual void print( std::ostream &os, int indent = 0 ) const;
     337  private:
     338        Type *type;
     339        std::string member;
     340};
     341
    321342/// OffsetofExpr represents an offsetof expression
    322343class OffsetofExpr : public Expression {
Note: See TracChangeset for help on using the changeset viewer.