Changeset 600 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src
- Timestamp:
- May 10, 2008, 8:50:41 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp
r523 r600 44 44 45 45 #include <jenga/include/jenga.h> 46 #include <abdev/ab_common/include/ab_common.h> 46 47 47 48 #include "../common.h" -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Const.cpp
r597 r600 7 7 } 8 8 9 void Consts::Add( const NamespaceScopes &namespaceScopes, const std::string &name , const char *Expression)9 void Consts::Add( const NamespaceScopes &namespaceScopes, const std::string &name, _int64 i64data, const Type &type ) 10 10 { 11 _int64 i64data; 12 Type resultType; 13 if( !StaticCalculation(false, Expression, 0, &i64data, resultType) ){ 14 //変数の場合 15 //何もしない(実行領域コンパイル時にdim宣言として扱う) 16 return; 17 } 18 19 //リテラル値の場合 20 //登録を行う 21 22 CConst *newconst = new CConst(namespaceScopes, name, resultType, i64data); 11 CConst *newconst = new CConst(namespaceScopes, name, type, i64data); 23 12 24 13 //ハッシュリストに追加 … … 69 58 return pConst->GetDoubleData(); 70 59 } 71 bool Consts::IsStringPtr( const Symbol &symbol ){60 bool Consts::IsStringPtr( const Symbol &symbol, bool isUnicode ){ 72 61 CConst *pConst = GetObjectPtr( symbol ); 73 62 … … 76 65 const Type &type = pConst->GetType(); 77 66 78 return ( type.GetBasicType() == typeOfPtrChar && type.GetIndex() == LITERAL_STRING ); 67 int charType = isUnicode 68 ? MAKE_PTR_TYPE(DEF_WORD,1) 69 : MAKE_PTR_TYPE(DEF_SBYTE,1); 70 71 return ( type.GetBasicType() == charType && type.GetIndex() == LITERAL_STRING ); 79 72 } 80 73 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Const.cpp
r579 r600 173 173 // 定数 174 174 const char *expression = temporary + i2 + 1; 175 consts.Add( namespaceScopes, name, expression ); 175 176 _int64 i64data; 177 Type resultType; 178 if( StaticCalculation(false, expression, 0, &i64data, resultType) ) 179 { 180 consts.Add( namespaceScopes, name, i64data, resultType ); 181 } 176 182 } 177 183 else -
trunk/ab5.0/abdev/BasicCompiler_Common/src/ObjectModule.cpp
r597 r600 53 53 54 54 #include <jenga/include/jenga.h> 55 #include <abdev/ab_common/include/ab_common.h> 55 56 56 57 #include "../common.h" … … 58 59 59 60 #include <option.h> 60 61 #include <abdev/ab_common/include/ab_common.h>62 61 63 62 using namespace ActiveBasic::Common::Lexical;
Note:
See TracChangeset
for help on using the changeset viewer.