Ignore:
Timestamp:
Sep 25, 2007, 11:13:33 PM (17 years ago)
Author:
dai_9181
Message:

"obj+=value" など、オブジェクトに対する代入演算の構文を "obj=obj+value" と置換して解釈するようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler64/increment.cpp

    r308 r329  
    66#include "Opcode.h"
    77
    8 void IncDec(int idCalc, const char *lpszLeft, const char *lpszRight){
     8void IncDec(int idCalc, const char *lpszLeft, const char *lpszRight)
     9{
     10    Type varType;
     11    if( GetVarType( lpszLeft, varType, false ) )
     12    {
     13        if( varType.IsObject() )
     14        {
     15            // オブジェクトが対象だったとき
     16            char temporary[8192];
     17            char calcStr[32];
     18            GetCalcName( idCalc, calcStr );
     19            sprintf( temporary, "%s=%s %s %s", lpszLeft, lpszLeft, calcStr, lpszRight );
     20            SetEscapeSequenceFormat( temporary );
     21            KillStringSpaces( temporary );
     22            OpcodeCalc( temporary );
     23            return;
     24        }
     25    }
    926
    1027    ///////////////////////////
     
    1330
    1431    RELATIVE_VAR VarRelativeVar;
    15     Type varType;
    1632    if(!GetVarOffsetReadWrite(
    1733        lpszLeft,
Note: See TracChangeset for help on using the changeset viewer.