Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision 6c89ecc6f88e055fd37187ef13c252282c1929be)
+++ src/SynTree/Type.h	(revision 014bb94951ba0f43292787ff7d1b0f2fd6733947)
@@ -598,7 +598,10 @@
 class TypeofType : public Type {
   public:
-	Expression *expr;
-
-	TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	Expression *expr;    ///< expression to take the type of
+	bool is_basetypeof;  ///< true iff is basetypeof type
+
+	TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	TypeofType( const Type::Qualifiers & tq, Expression *expr, bool is_basetypeof, 
+		const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 	TypeofType( const TypeofType& );
 	virtual ~TypeofType();
Index: src/SynTree/TypeofType.cc
===================================================================
--- src/SynTree/TypeofType.cc	(revision 6c89ecc6f88e055fd37187ef13c252282c1929be)
+++ src/SynTree/TypeofType.cc	(revision 014bb94951ba0f43292787ff7d1b0f2fd6733947)
@@ -23,9 +23,14 @@
 class Attribute;
 
-TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, const std::list< Attribute * > & attributes ) : Type( tq, attributes ), expr( expr ) {
-}
+TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, 
+	const std::list< Attribute * > & attributes ) 
+: Type( tq, attributes ), expr( expr ), is_basetypeof(false) {}
 
-TypeofType::TypeofType( const TypeofType &other ) : Type( other ), expr( maybeClone( other.expr ) ) {
-}
+TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, bool is_basetypeof, 
+	const std::list< Attribute * > & attributes ) 
+: Type( tq, attributes ), expr( expr ), is_basetypeof( is_basetypeof ) {}
+
+TypeofType::TypeofType( const TypeofType &other )
+: Type( other ), expr( maybeClone( other.expr ) ), is_basetypeof( other.is_basetypeof ) {}
 
 TypeofType::~TypeofType() {
@@ -35,4 +40,5 @@
 void TypeofType::print( std::ostream &os, Indenter indent ) const {
 	Type::print( os, indent );
+	if ( is_basetypeof ) { os << "base-"; }
 	os << "type-of expression ";
 	if ( expr ) {
