Changes in src/SynTree/Initializer.h [65cdc1e:6b0b624]
- File:
-
- 1 edited
-
src/SynTree/Initializer.h (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Initializer.h
r65cdc1e r6b0b624 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Aug 9 10:19:00201713 // Update Count : 2 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:52:02 2017 13 // Update Count : 21 14 14 // 15 15 … … 27 27 class Designation : public BaseSyntaxNode { 28 28 public: 29 std::list< Expression * > designators;30 31 29 Designation( const std::list< Expression * > & designators ); 32 30 Designation( const Designation & other ); … … 39 37 virtual Designation * acceptMutator( Mutator &m ) { return m.mutate( this ); } 40 38 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 constant67 68 65 SingleInit( Expression *value, bool maybeConstructed = false ); 69 66 SingleInit( const SingleInit &other ); … … 77 74 virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); } 78 75 virtual void print( std::ostream &os, int indent = 0 ) const; 76 private: 77 //Constant *value; 78 Expression *value; // has to be a compile-time constant 79 79 }; 80 80 … … 83 83 class ListInit : public Initializer { 84 84 public: 85 std::list<Initializer *> initializers; // order *is* important86 std::list<Designation *> designations; // order/length is consistent with initializers87 88 85 ListInit( const std::list<Initializer*> &initializers, 89 86 const std::list<Designation *> &designators = {}, bool maybeConstructed = false ); … … 105 102 virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); } 106 103 virtual void print( std::ostream &os, int indent = 0 ) const; 104 private: 105 std::list<Initializer *> initializers; // order *is* important 106 std::list<Designation *> designations; // order/length is consistent with initializers 107 107 }; 108 108 … … 113 113 class ConstructorInit : public Initializer { 114 114 public: 115 Statement * ctor;116 Statement * dtor;117 118 115 ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init ); 119 116 ConstructorInit( const ConstructorInit &other ); … … 133 130 134 131 private: 132 Statement * ctor; 133 Statement * dtor; 135 134 // C-style initializer made up of SingleInit and ListInit nodes to use as a fallback 136 135 // if an appropriate constructor definition is not found by the resolver
Note:
See TracChangeset
for help on using the changeset viewer.