Index: BasicCompiler_Common/Class.cpp
===================================================================
--- BasicCompiler_Common/Class.cpp	(revision 63)
+++ BasicCompiler_Common/Class.cpp	(revision 64)
@@ -101,9 +101,4 @@
 
 int CMember::GetSize(){
-	if( IsRef() ){
-		// 参照型
-		return PTR_SIZE;
-	}
-
 	//メンバサイズを取得
 	return GetTypeSize(TypeInfo.type,TypeInfo.u.lpIndex);
@@ -126,23 +121,13 @@
 			char temporary[VN_SIZE];
 			sprintf(temporary,"%s.%s",pobj_c->name,member->name);
-			AddGlobalVariable(
+			dim(
 				false,
 				temporary,
 				member->SubScripts,
-				&member->TypeInfo,
+				member->TypeInfo,
 				GetTypeSize(member->TypeInfo.type,member->TypeInfo.u.lpIndex),
 				member->InitBuf,
 				member->ConstractParameter,
 				0);
-
-			if(member->TypeInfo.type==DEF_OBJECT){
-				//エラー用
-				cp=member->source_code_address;
-
-				CallConstructor(temporary,
-					member->SubScripts,
-					member->TypeInfo,
-					member->ConstractParameter);
-			}
 
 			//ネイティブコードバッファの再確保
@@ -220,4 +205,10 @@
 	}
 }
+
+bool CClass::IsStructure() const
+{
+	return classType == CClass::Structure;
+}
+
 void CClass::Inherits( CClass *pInheritsClass ){
 	int i3;
@@ -437,5 +428,5 @@
 		//アラインメントを算出
 		int member_size;
-		if(pMember->TypeInfo.type==DEF_OBJECT){
+		if(pMember->TypeInfo.type==DEF_STRUCT){
 			//メンバクラスのアラインメントを取得
 			member_size=pMember->TypeInfo.u.pobj_Class->GetAlignment();
@@ -500,5 +491,5 @@
 		CMember *pMember = ppobj_Member[i];
 
-		if(pMember->TypeInfo.type==DEF_OBJECT && pMember->IsRef() == false){
+		if(pMember->TypeInfo.type==DEF_STRUCT){
 			//メンバクラスのアラインメントを取得
 			member_size=pMember->TypeInfo.u.pobj_Class->GetAlignment();
@@ -598,5 +589,5 @@
 	//コンポジションの関係にあるメンバも検査する
 	for(int i=0;i < iMemberNum;i++){
-		if(ppobj_Member[i]->TypeInfo.type==DEF_OBJECT && ppobj_Member[i]->IsRef() == false){
+		if(ppobj_Member[i]->TypeInfo.type==DEF_OBJECT){
 			if(ppobj_Member[i]->TypeInfo.u.pobj_Class->IsAbstract())
 				return true;
@@ -805,5 +796,16 @@
 
 				//クラスを追加
-				pobj_DBClass->AddClass(temporary,NowLine);
+				CClass *pClass = pobj_DBClass->AddClass(temporary,NowLine);
+				if( pClass ){
+					if( basbuf[NowLine+1] == ESC_CLASS ){
+						pClass->classType = CClass::Class;
+					}
+					else if( basbuf[NowLine+1] == ESC_INTERFACE ){
+						pClass->classType = CClass::Interface;
+					}
+					else{
+						pClass->classType = CClass::Structure;
+					}
+				}
 		}
 	}
@@ -843,4 +845,5 @@
 		if(psi->ParmNum==0) fConstructor=1;
 
+		// TODO: 消す
 		//コピーコンストラクタ
 		if(psi->ParmNum==1){
@@ -953,5 +956,5 @@
 	for(i=0;i<pobj_c->iMemberNum;i++){
 		CMember *pMember = pobj_c->ppobj_Member[i];
-		if(pMember->TypeInfo.type==DEF_OBJECT && pMember->IsRef()==false ){
+		if(pMember->TypeInfo.type==DEF_OBJECT){
 			//循環参照でないかをチェック
 			if(pobj_LoopRefCheck->check(pMember->TypeInfo.u.pobj_Class->name)){
@@ -976,5 +979,4 @@
 	extern char *basbuf;
 	int i,i2,i3,sub_address,top_pos;
-	DWORD dwClassType;
 	DWORD dwAccess;
 	char temporary[8192];
@@ -1132,5 +1134,5 @@
 			top_pos=i;
 
-			dwClassType=basbuf[i+1];
+			const DWORD dwClassType=basbuf[i+1];
 
 			i+=2;
@@ -1263,5 +1265,5 @@
 					i += 2;
 				}
-
+/*
 				//Ref修飾子
 				bool isRef = false;
@@ -1269,5 +1271,5 @@
 					isRef = true;
 					i += 2;
-				}
+				}*/
 
 				if(basbuf[i]==1&&(
@@ -1348,13 +1350,14 @@
 						//静的メンバを追加
 						cp=i;	//エラー用
-						pobj_c->AddStaticMember( dwAccess, isConst, isRef, temporary, i);
+						pobj_c->AddStaticMember( dwAccess, isConst, false, temporary, i);
 					}
 					else{
 						//メンバを追加
 						cp=i;	//エラー用
-						pobj_c->AddMember( dwAccess, isConst, isRef, temporary );
-
-
-						if(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.type==DEF_OBJECT){
+						pobj_c->AddMember( dwAccess, isConst, false, temporary );
+
+
+						if(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.type==DEF_OBJECT||
+							pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.type==DEF_STRUCT){
 							if(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.u.pobj_Class->ppobj_Member==0){
 								//参照先が読み取られていないとき
@@ -1376,9 +1379,4 @@
 				}
 				else{
-					// 文法エラーチェック
-					if( isRef ){
-						SetError(1,NULL,cp);
-					}
-
 					//メソッドを追加
 					cp=i;	//エラー用
