Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Initializer.h

    r65cdc1e r6b0b624  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Aug  9 10:19:00 2017
    13 // Update Count     : 22
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:52:02 2017
     13// Update Count     : 21
    1414//
    1515
     
    2727class Designation : public BaseSyntaxNode {
    2828public:
    29         std::list< Expression * > designators;
    30 
    3129        Designation( const std::list< Expression * > & designators );
    3230        Designation( const Designation & other );
     
    3937        virtual Designation * acceptMutator( Mutator &m ) { return m.mutate( this ); }
    4038        virtual void print( std::ostream &os, int indent = 0 ) const;
     39private:
     40        std::list< Expression * > designators;
    4141};
    4242
     
    6363class SingleInit : public Initializer {
    6464  public:
    65         //Constant *value;
    66         Expression *value;      // has to be a compile-time constant
    67 
    6865        SingleInit( Expression *value, bool maybeConstructed = false );
    6966        SingleInit( const SingleInit &other );
     
    7774        virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    7875        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
    7979};
    8080
     
    8383class ListInit : public Initializer {
    8484  public:
    85         std::list<Initializer *> initializers;  // order *is* important
    86         std::list<Designation *> designations;  // order/length is consistent with initializers
    87 
    8885        ListInit( const std::list<Initializer*> &initializers,
    8986                          const std::list<Designation *> &designators = {}, bool maybeConstructed = false );
     
    105102        virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    106103        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
    107107};
    108108
     
    113113class ConstructorInit : public Initializer {
    114114  public:
    115         Statement * ctor;
    116         Statement * dtor;
    117 
    118115        ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init );
    119116        ConstructorInit( const ConstructorInit &other );
     
    133130
    134131  private:
     132        Statement * ctor;
     133        Statement * dtor;
    135134        // C-style initializer made up of SingleInit and ListInit nodes to use as a fallback
    136135        // if an appropriate constructor definition is not found by the resolver
Note: See TracChangeset for help on using the changeset viewer.