Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision bf4ac097c572e75965508a6487a639abaf9d6cc9)
+++ src/SynTree/Type.h	(revision 738e304434a8d55d18a675ee9a657a04fc1da1ed)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar 15 21:23:08 2017
-// Update Count     : 84
+// Last Modified On : Wed Mar 15 21:28:09 2017
+// Update Count     : 85
 //
 
@@ -24,28 +24,4 @@
 class Type : public BaseSyntaxNode {
   public:
-	// struct Qualifiers {
-	// 	Qualifiers(): isConst( false ), isVolatile( false ), isRestrict( false ), isLvalue( false ), isAtomic( false ), isMutex( false ) {}
-	// 	Qualifiers( bool isConst, bool isVolatile, bool isRestrict, bool isLvalue, bool isAtomic, bool isMutex ): isConst( isConst ), isVolatile( isVolatile ), isRestrict( isRestrict ), isLvalue( isLvalue ), isAtomic( isAtomic ), isMutex( isMutex ) {}
-
-	// 	Qualifiers &operator&=( const Qualifiers &other );
-	// 	Qualifiers &operator+=( const Qualifiers &other );
-	// 	Qualifiers &operator-=( const Qualifiers &other );
-	// 	Qualifiers operator+( const Type::Qualifiers &other );
-	// 	bool operator==( const Qualifiers &other );
-	// 	bool operator!=( const Qualifiers &other );
-	// 	bool operator<=( const Qualifiers &other );
-	// 	bool operator>=( const Qualifiers &other );
-	// 	bool operator<( const Qualifiers &other );
-	// 	bool operator>( const Qualifiers &other );
-	// 	void print( std::ostream &os, int indent = 0 ) const;
-
-	// 	bool isConst;
-	// 	bool isVolatile;
-	// 	bool isRestrict;
-	// 	bool isLvalue;
-	// 	bool isAtomic;
-	// 	bool isMutex;
-	// };
-
 	static const char * QualifierNames[];
 
@@ -100,5 +76,5 @@
 			return q;
 		}
-	 	void print( std::ostream &os, int indent = 0 ) const {
+	 	void print( std::ostream & os, int indent = 0 ) const {
 			if ( (*this).any() ) {						// any type qualifiers ?
 				for ( unsigned int i = 0; i < NumTypeQualifier; i += 1 ) {
@@ -111,9 +87,9 @@
 	}; // Qualifiers
 
-	Type( const Qualifiers &tq, const std::list< Attribute * > & attributes );
-	Type( const Type &other );
+	Type( const Qualifiers & tq, const std::list< Attribute * > & attributes );
+	Type( const Type & other );
 	virtual ~Type();
 
-	Qualifiers &get_qualifiers() { return tq; }
+	Qualifiers & get_qualifiers() { return tq; }
 	bool get_isConst() { return tq.isConst; }
 	bool get_isVolatile() { return tq.isVolatile; }
@@ -141,7 +117,7 @@
 
 	virtual Type *clone() const = 0;
-	virtual void accept( Visitor &v ) = 0;
-	virtual Type *acceptMutator( Mutator &m ) = 0;
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) = 0;
+	virtual Type *acceptMutator( Mutator & m ) = 0;
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	Qualifiers tq;
@@ -154,5 +130,5 @@
 class VoidType : public Type {
   public:
-	VoidType( const Type::Qualifiers &tq, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	VoidType( const Type::Qualifiers & tq, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 
 	virtual unsigned size() const { return 0; };
@@ -160,7 +136,7 @@
 
 	virtual VoidType *clone() const { return new VoidType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
 };
 
@@ -194,5 +170,5 @@
 	static const char *typeNames[];						// string names for basic types, MUST MATCH with Kind
 
-	BasicType( const Type::Qualifiers &tq, Kind bt, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	BasicType( const Type::Qualifiers & tq, Kind bt, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 
 	Kind get_kind() { return kind; }
@@ -200,7 +176,7 @@
 
 	virtual BasicType *clone() const { return new BasicType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
 
 	bool isInteger() const;
@@ -211,6 +187,6 @@
 class PointerType : public Type {
   public:
-	PointerType( const Type::Qualifiers &tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
-	PointerType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	PointerType( const Type::Qualifiers & tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	PointerType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 	PointerType( const PointerType& );
 	virtual ~PointerType();
@@ -226,7 +202,7 @@
 
 	virtual PointerType *clone() const { return new PointerType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	Type *base;
@@ -240,5 +216,5 @@
 class ArrayType : public Type {
   public:
-	ArrayType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	ArrayType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 	ArrayType( const ArrayType& );
 	virtual ~ArrayType();
@@ -256,7 +232,7 @@
 
 	virtual ArrayType *clone() const { return new ArrayType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	Type *base;
@@ -268,5 +244,5 @@
 class FunctionType : public Type {
   public:
-	FunctionType( const Type::Qualifiers &tq, bool isVarArgs, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	FunctionType( const Type::Qualifiers & tq, bool isVarArgs, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 	FunctionType( const FunctionType& );
 	virtual ~FunctionType();
@@ -279,7 +255,7 @@
 
 	virtual FunctionType *clone() const { return new FunctionType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	std::list<DeclarationWithType*> returnVals;
@@ -295,9 +271,9 @@
 class ReferenceToType : public Type {
   public:
-	ReferenceToType( const Type::Qualifiers &tq, const std::string &name, const std::list< Attribute * > & attributes );
-	ReferenceToType( const ReferenceToType &other );
+	ReferenceToType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes );
+	ReferenceToType( const ReferenceToType & other );
 	virtual ~ReferenceToType();
 
-	const std::string &get_name() const { return name; }
+	const std::string & get_name() const { return name; }
 	void set_name( std::string newValue ) { name = newValue; }
 	std::list< Expression* >& get_parameters() { return parameters; }
@@ -306,7 +282,7 @@
 
 	virtual ReferenceToType *clone() const = 0;
-	virtual void accept( Visitor &v ) = 0;
-	virtual Type *acceptMutator( Mutator &m ) = 0;
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) = 0;
+	virtual Type *acceptMutator( Mutator & m ) = 0;
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   protected:
 	virtual std::string typeString() const = 0;
@@ -320,7 +296,7 @@
 	typedef ReferenceToType Parent;
   public:
-	StructInstType( const Type::Qualifiers &tq, const std::string &name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseStruct( 0 ) {}
-	StructInstType( const Type::Qualifiers &tq, StructDecl * baseStruct, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
-	StructInstType( const StructInstType &other ) : Parent( other ), baseStruct( other.baseStruct ) {}
+	StructInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseStruct( 0 ) {}
+	StructInstType( const Type::Qualifiers & tq, StructDecl * baseStruct, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	StructInstType( const StructInstType & other ) : Parent( other ), baseStruct( other.baseStruct ) {}
 
 	StructDecl *get_baseStruct() const { return baseStruct; }
@@ -334,11 +310,11 @@
 	/// Looks up the members of this struct named "name" and places them into "foundDecls".
 	/// Clones declarations into "foundDecls", caller responsible for freeing
-	void lookup( const std::string &name, std::list< Declaration* > &foundDecls ) const;
+	void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const;
 
 	virtual StructInstType *clone() const { return new StructInstType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	virtual std::string typeString() const;
@@ -352,7 +328,7 @@
 	typedef ReferenceToType Parent;
   public:
-	UnionInstType( const Type::Qualifiers &tq, const std::string &name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseUnion( 0 ) {}
-	UnionInstType( const Type::Qualifiers &tq, UnionDecl * baseUnion, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
-	UnionInstType( const UnionInstType &other ) : Parent( other ), baseUnion( other.baseUnion ) {}
+	UnionInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseUnion( 0 ) {}
+	UnionInstType( const Type::Qualifiers & tq, UnionDecl * baseUnion, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	UnionInstType( const UnionInstType & other ) : Parent( other ), baseUnion( other.baseUnion ) {}
 
 	UnionDecl *get_baseUnion() const { return baseUnion; }
@@ -366,11 +342,11 @@
 	/// looks up the members of this union named "name" and places them into "foundDecls"
 	/// Clones declarations into "foundDecls", caller responsible for freeing
-	void lookup( const std::string &name, std::list< Declaration* > &foundDecls ) const;
+	void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const;
 
 	virtual UnionInstType *clone() const { return new UnionInstType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	virtual std::string typeString() const;
@@ -384,7 +360,7 @@
 	typedef ReferenceToType Parent;
   public:
-	EnumInstType( const Type::Qualifiers &tq, const std::string &name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
-	EnumInstType( const Type::Qualifiers &tq, EnumDecl * baseEnum, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
-	EnumInstType( const EnumInstType &other ) : Parent( other ), baseEnum( other.baseEnum ) {}
+	EnumInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
+	EnumInstType( const Type::Qualifiers & tq, EnumDecl * baseEnum, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	EnumInstType( const EnumInstType & other ) : Parent( other ), baseEnum( other.baseEnum ) {}
 
 	EnumDecl *get_baseEnum() const { return baseEnum; }
@@ -394,6 +370,6 @@
 
 	virtual EnumInstType *clone() const { return new EnumInstType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
   private:
 	virtual std::string typeString() const;
@@ -407,6 +383,6 @@
 	typedef ReferenceToType Parent;
   public:
-	TraitInstType( const Type::Qualifiers &tq, const std::string &name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
-	TraitInstType( const TraitInstType &other );
+	TraitInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
+	TraitInstType( const TraitInstType & other );
 	~TraitInstType();
 
@@ -416,6 +392,6 @@
 
 	virtual TraitInstType *clone() const { return new TraitInstType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
   private:
 	virtual std::string typeString() const;
@@ -429,7 +405,7 @@
 	typedef ReferenceToType Parent;
   public:
-	TypeInstType( const Type::Qualifiers &tq, const std::string &name, TypeDecl *baseType, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
-	TypeInstType( const Type::Qualifiers &tq, const std::string &name, bool isFtype, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
-	TypeInstType( const TypeInstType &other );
+	TypeInstType( const Type::Qualifiers & tq, const std::string & name, TypeDecl *baseType, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	TypeInstType( const Type::Qualifiers & tq, const std::string & name, bool isFtype, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	TypeInstType( const TypeInstType & other );
 	~TypeInstType();
 
@@ -442,7 +418,7 @@
 
 	virtual TypeInstType *clone() const { return new TypeInstType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	virtual std::string typeString() const;
@@ -455,5 +431,5 @@
 class TupleType : public Type {
   public:
-	TupleType( const Type::Qualifiers &tq, const std::list< Type * > & types = std::list< Type * >(), const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	TupleType( const Type::Qualifiers & tq, const std::list< Type * > & types = std::list< Type * >(), const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
 	TupleType( const TupleType& );
 	virtual ~TupleType();
@@ -476,7 +452,7 @@
 
 	virtual TupleType *clone() const { return new TupleType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	std::list<Type*> types;
@@ -485,5 +461,5 @@
 class TypeofType : public Type {
   public:
-	TypeofType( const Type::Qualifiers &tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
 	TypeofType( const TypeofType& );
 	virtual ~TypeofType();
@@ -495,7 +471,7 @@
 
 	virtual TypeofType *clone() const { return new TypeofType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	Expression *expr;
@@ -504,11 +480,11 @@
 class AttrType : public Type {
   public:
-	AttrType( const Type::Qualifiers &tq, const std::string &name, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
-	AttrType( const Type::Qualifiers &tq, const std::string &name, Type *type, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	AttrType( const Type::Qualifiers & tq, const std::string & name, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	AttrType( const Type::Qualifiers & tq, const std::string & name, Type *type, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
 	AttrType( const AttrType& );
 	virtual ~AttrType();
 
-	const std::string &get_name() const { return name; }
-	void set_name( const std::string &newValue ) { name = newValue; }
+	const std::string & get_name() const { return name; }
+	void set_name( const std::string & newValue ) { name = newValue; }
 	Expression *get_expr() const { return expr; }
 	void set_expr( Expression *newValue ) { expr = newValue; }
@@ -521,7 +497,7 @@
 
 	virtual AttrType *clone() const { return new AttrType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
   private:
 	std::string name;
@@ -540,7 +516,7 @@
 
 	virtual VarArgsType *clone() const { return new VarArgsType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
 };
 
@@ -552,7 +528,7 @@
 
 	virtual ZeroType *clone() const { return new ZeroType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
 };
 
@@ -564,7 +540,7 @@
 
 	virtual OneType *clone() const { return new OneType( *this ); }
-	virtual void accept( Visitor &v ) { v.visit( this ); }
-	virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
 };
 
