Changeset 564 in dev for trunk/ab5.0/abdev/BasicCompiler_Common
- Timestamp:
- May 5, 2008, 2:17:58 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp
r561 r564 1050 1050 1051 1051 //定数マクロとして定義されている場合は抜け出す 1052 if( compiler.GetObjectModule().meta.GetGlobalConstMacros().IsExist ( VarName ) )1052 if( compiler.GetObjectModule().meta.GetGlobalConstMacros().IsExistDuplicationKeyName( VarName ) ) 1053 1053 { 1054 1054 return; … … 1073 1073 1074 1074 //定数マクロとして定義されている場合 1075 if( compiler.GetObjectModule().meta.GetGlobalConstMacros().IsExist ( VarName ) ){1075 if( compiler.GetObjectModule().meta.GetGlobalConstMacros().IsExistDuplicationKeyName( VarName ) ){ 1076 1076 compiler.errorMessenger.Output(15,VarName,cp); 1077 1077 return; -
trunk/ab5.0/abdev/BasicCompiler_Common/include/Class.h
r562 r564 494 494 } 495 495 496 virtual CClass *Create( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name);497 496 bool Insert( CClass *pClass, int nowLine ); 498 497 CClass *Add( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine); -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp
r563 r564 646 646 647 647 return false; 648 }649 650 CClass *Classes::Create( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name){651 return new CClass(namespaceScopes, importedNamespaces, name);652 }653 bool Classes::Insert( CClass *pClass, int nowLine )654 {655 /////////////////////////////////656 // ハッシュデータに追加657 /////////////////////////////////658 659 if( !Put( pClass ) )660 {661 compiler.errorMessenger.Output(15,pClass->GetName(), nowLine);662 return false;663 }664 return true;665 }666 CClass *Classes::Add( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine){667 //////////////////////////////////////////////////////////////////////////668 // クラスを追加669 // ※名前のみを登録。その他の情報はSetClassメソッドで!670 //////////////////////////////////////////////////////////////////////////671 672 CClass *pClass = Create(namespaceScopes, importedNamespaces, name);673 674 if( !Insert( pClass, nowLine ) )675 {676 return NULL;677 }678 679 return pClass;680 648 } 681 649 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp
r561 r564 121 121 122 122 //クラスを追加 123 CClass *pClass = classes.Add(namespaceScopes, importedNamespaces, temporary,nowLine); 124 if( pClass ){ 125 if( source[nowLine+1] == ESC_CLASS ){ 126 if( isEnum ) 127 { 128 pClass->SetClassType( CClass::Enum ); 129 } 130 else if( isDelegate ) 131 { 132 pClass->SetClassType( CClass::Delegate ); 133 } 134 else{ 135 pClass->SetClassType( CClass::Class ); 136 } 137 } 138 else if( source[nowLine+1] == ESC_INTERFACE ){ 139 pClass->SetClassType( CClass::Interface ); 123 CClass *pClass = new CClass( namespaceScopes, importedNamespaces, temporary ); 124 if( classes.IsExist( pClass ) ) 125 { 126 // 既に存在している 127 compiler.errorMessenger.Output(15,pClass->GetName(), nowLine); 128 129 delete pClass; 130 131 continue; 132 } 133 134 classes.Put( pClass ); 135 136 if( source[nowLine+1] == ESC_CLASS ) 137 { 138 if( isEnum ) 139 { 140 pClass->SetClassType( CClass::Enum ); 141 } 142 else if( isDelegate ) 143 { 144 pClass->SetClassType( CClass::Delegate ); 140 145 } 141 146 else{ 142 pClass->SetClassType( CClass::Structure ); 143 } 147 pClass->SetClassType( CClass::Class ); 148 } 149 } 150 else if( source[nowLine+1] == ESC_INTERFACE ) 151 { 152 pClass->SetClassType( CClass::Interface ); 153 } 154 else 155 { 156 pClass->SetClassType( CClass::Structure ); 144 157 } 145 158 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Const.cpp
r543 r564 162 162 163 163 //重複チェック 164 if( compiler.GetObjectModule().meta.GetGlobalConstMacros().IsExist ( name )165 || compiler.GetObjectModule().meta.GetGlobalConsts().IsExist ( name ) )164 if( compiler.GetObjectModule().meta.GetGlobalConstMacros().IsExistDuplicationKeyName( name ) 165 || compiler.GetObjectModule().meta.GetGlobalConsts().IsExistDuplicationKeyName( name ) ) 166 166 { 167 167 compiler.errorMessenger.Output(15,name,cp);
Note:
See TracChangeset
for help on using the changeset viewer.