Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r0f79853 rcdb990a  
    865865};
    866866
    867 /// expression wrapping the use of a default argument - should never make it past the resolver.
    868 class DefaultArgExpr : public Expression {
    869 public:
    870         Expression * expr;
    871 
    872         DefaultArgExpr( Expression * expr );
    873         DefaultArgExpr( const DefaultArgExpr & other );
    874         ~DefaultArgExpr();
    875 
    876         virtual DefaultArgExpr * clone() const { return new DefaultArgExpr( * this ); }
    877         virtual void accept( Visitor & v ) { v.visit( this ); }
    878         virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    879         virtual void print( std::ostream & os, Indenter indent = {} ) const;
    880 };
    881 
    882 /// C11 _Generic expression
    883 class GenericExpr : public Expression {
    884 public:
    885         struct Association {
    886                 Type * type = nullptr;
    887                 Expression * expr = nullptr;
    888                 bool isDefault = false;
    889 
    890                 Association( Type * type, Expression * expr );
    891                 Association( Expression * expr );
    892                 Association( const Association & other );
    893                 Association & operator=( const Association & other ) = delete; // at the moment this isn't used, and I don't want to implement it
    894                 ~Association();
    895         };
    896 
    897         Expression * control;
    898         std::list<Association> associations;
    899 
    900         GenericExpr( Expression * control, const std::list<Association> & assoc );
    901         GenericExpr( const GenericExpr & other );
    902         virtual ~GenericExpr();
    903 
    904         virtual GenericExpr * clone() const { return new GenericExpr( * this ); }
    905         virtual void accept( Visitor & v ) { v.visit( this ); }
    906         virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    907         virtual void print( std::ostream & os, Indenter indent = {} ) const;
    908 };
    909 
    910867// Local Variables: //
    911868// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.