Changeset cd7ef0b for src/SynTree/Initializer.h
- Timestamp:
- Aug 10, 2017, 3:39:11 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 38d70ab
- Parents:
- 275f4b4 (diff), e1780a2 (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/Initializer.h
r275f4b4 rcd7ef0b 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:52:02201713 // Update Count : 2 111 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Aug 9 10:19:00 2017 13 // Update Count : 22 14 14 // 15 15 … … 27 27 class Designation : public BaseSyntaxNode { 28 28 public: 29 std::list< Expression * > designators; 30 29 31 Designation( const std::list< Expression * > & designators ); 30 32 Designation( const Designation & other ); … … 37 39 virtual Designation * acceptMutator( Mutator &m ) { return m.mutate( this ); } 38 40 virtual void print( std::ostream &os, int indent = 0 ) const; 39 private:40 std::list< Expression * > designators;41 41 }; 42 42 … … 63 63 class SingleInit : public Initializer { 64 64 public: 65 //Constant *value; 66 Expression *value; // has to be a compile-time constant 67 65 68 SingleInit( Expression *value, bool maybeConstructed = false ); 66 69 SingleInit( const SingleInit &other ); … … 74 77 virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); } 75 78 virtual void print( std::ostream &os, int indent = 0 ) const; 76 private:77 //Constant *value;78 Expression *value; // has to be a compile-time constant79 79 }; 80 80 … … 83 83 class ListInit : public Initializer { 84 84 public: 85 std::list<Initializer *> initializers; // order *is* important 86 std::list<Designation *> designations; // order/length is consistent with initializers 87 85 88 ListInit( const std::list<Initializer*> &initializers, 86 89 const std::list<Designation *> &designators = {}, bool maybeConstructed = false ); … … 102 105 virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); } 103 106 virtual void print( std::ostream &os, int indent = 0 ) const; 104 private:105 std::list<Initializer *> initializers; // order *is* important106 std::list<Designation *> designations; // order/length is consistent with initializers107 107 }; 108 108 … … 113 113 class ConstructorInit : public Initializer { 114 114 public: 115 Statement * ctor; 116 Statement * dtor; 117 115 118 ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init ); 116 119 ConstructorInit( const ConstructorInit &other ); … … 130 133 131 134 private: 132 Statement * ctor;133 Statement * dtor;134 135 // C-style initializer made up of SingleInit and ListInit nodes to use as a fallback 135 136 // if an appropriate constructor definition is not found by the resolver
Note:
See TracChangeset
for help on using the changeset viewer.