Ignore:
Timestamp:
Dec 7, 2006, 3:09:44 AM (17 years ago)
Author:
dai_9181
Message:

Constステートメントで定数変数を宣言できるように改良。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Intermediate_Step2.cpp

    r4 r7  
    4444            return;
    4545        }
    46         if(Command[i]=='='||Command[i]=='('){
     46        if(Command[i]=='='){
     47            //定数定義は新しいクラスモジュール(CDBConst)へ移行
     48            return;
     49        }
     50        if(Command[i]=='('){
    4751            temporary[i]=0;
    4852            break;
     
    230234
    231235        //定数を追加
    232         CONSTINFO *pci;
    233         pci=GetNewConstHash(temporary);
    234         pci->name=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
    235         lstrcpy(pci->name,temporary);
    236         pci->type=DEF_LONG;
    237         pci->lpIndex=-1;
    238         pci->DblValue=(double)NextValue;
    239         pci->StrValue=0;
     236        CDBConst::obj.AddConst(temporary, NextValue);
    240237    }
    241238}
     
    282279                temporary[i2]=basbuf[i];
    283280            }
    284             AddConstData(temporary);
     281            CDBConst::obj.Add(temporary);
    285282            if(basbuf[i]=='\0') break;
    286283        }
Note: See TracChangeset for help on using the changeset viewer.