Changeset 28f3a19 for src/SynTree/Expression.h
- Timestamp:
- Jun 27, 2018, 3:28:41 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- b21c77a
- Parents:
- 0182bfa (diff), 63238a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
r0182bfa r28f3a19 833 833 }; 834 834 835 /// expression wrapping the use of a default argument - should never make it past the resolver. 836 class DefaultArgExpr : public Expression { 837 public: 838 Expression * expr; 839 840 DefaultArgExpr( Expression * expr ); 841 DefaultArgExpr( const DefaultArgExpr & other ); 842 843 virtual DefaultArgExpr * clone() const { return new DefaultArgExpr( * this ); } 844 virtual void accept( Visitor & v ) { v.visit( this ); } 845 virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); } 846 virtual void print( std::ostream & os, Indenter indent = {} ) const; 847 }; 848 849 /// C11 _Generic expression 850 class GenericExpr : public Expression { 851 public: 852 struct Association { 853 Type * type = nullptr; 854 Expression * expr = nullptr; 855 bool isDefault = false; 856 857 Association( Type * type, Expression * expr ); 858 Association( Expression * expr ); 859 Association( const Association & other ); 860 Association & operator=( const Association & other ) = delete; // at the moment this isn't used, and I don't want to implement it 861 }; 862 863 Expression * control; 864 std::list<Association> associations; 865 866 GenericExpr( Expression * control, const std::list<Association> & assoc ); 867 GenericExpr( const GenericExpr & other ); 868 ~GenericExpr(); 869 870 virtual GenericExpr * clone() const { return new GenericExpr( * this ); } 871 virtual void accept( Visitor & v ) { v.visit( this ); } 872 virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); } 873 virtual void print( std::ostream & os, Indenter indent = {} ) const; 874 }; 875 835 876 // Local Variables: // 836 877 // tab-width: 4 //
Note: See TracChangeset
for help on using the changeset viewer.