Changeset 75 in dev for BasicCompiler_Common/Const.cpp


Ignore:
Timestamp:
Mar 20, 2007, 4:36:16 AM (17 years ago)
Author:
dai_9181
Message:

TYPEINFO→Typeへのリファクタリングを実施。64bitはほぼ完了。32bitが全般的に未完成。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Const.cpp

    r7 r75  
    153153}
    154154void CDBConst::AddConst(char *Name, char *Expression){
    155     LONG_PTR lpIndex;
    156155    _int64 i64data;
    157     int Type = StaticCalculation(false, Expression, 0, &i64data, &lpIndex);
    158 
    159     if(Type){
    160         //リテラル値の場合
    161         //登録を行う
    162 
    163         CConst *newconst = new CConst(Name, Type, i64data);
    164 
    165         AddConst(Name, newconst);
    166     }
    167     else{
     156    Type resultType;
     157    if( !StaticCalculation(false, Expression, 0, &i64data, resultType) ){
    168158        //変数の場合
    169159        //何もしない(実行領域コンパイル時にdim宣言として扱う)
    170     }
     160        return;
     161    }
     162
     163    //リテラル値の場合
     164    //登録を行う
     165
     166    CConst *newconst = new CConst(Name, resultType.GetBasicType(), i64data);
     167
     168    AddConst(Name, newconst);
    171169}
    172170void CDBConst::AddConst(char *Name, int value){
Note: See TracChangeset for help on using the changeset viewer.