Ignore:
Timestamp:
May 10, 2008, 8:50:41 PM (16 years ago)
Author:
dai_9181
Message:

依存関係を整理中

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Const.cpp

    r597 r600  
    77}
    88
    9 void Consts::Add( const NamespaceScopes &namespaceScopes, const std::string &name , const char *Expression)
     9void Consts::Add( const NamespaceScopes &namespaceScopes, const std::string &name, _int64 i64data, const Type &type )
    1010{
    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);
    2312
    2413    //ハッシュリストに追加
     
    6958    return pConst->GetDoubleData();
    7059}
    71 bool Consts::IsStringPtr( const Symbol &symbol ){
     60bool Consts::IsStringPtr( const Symbol &symbol, bool isUnicode ){
    7261    CConst *pConst = GetObjectPtr( symbol );
    7362
     
    7665    const Type &type = pConst->GetType();
    7766
    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 );
    7972}
    8073
Note: See TracChangeset for help on using the changeset viewer.