Changeset 41 in dev for BasicCompiler64/NumOpe.cpp


Ignore:
Timestamp:
Jan 28, 2007, 5:28:43 AM (17 years ago)
Author:
dai_9181
Message:

ByVal演算子を追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/NumOpe.cpp

    r38 r41  
    737737                if(!Calc_Cast(type,index_stack,&sp)) goto error;
    738738                break;
     739            case CALC_BYVAL:
     740                //ポインタ型→参照型
     741                if( PTR_LEVEL( type[sp-1] ) <= 0 ){
     742                    //ポインタ型ではないとき
     743                    SetError( 3, NULL, cp );
     744                    goto error;
     745                }
     746
     747                type[sp-1] = PTR_LEVEL_DOWN( type[sp-1] );
     748
     749                break;
    739750
    740751            default:
    741752                SetError(300,NULL,cp);
    742                 break;
     753                goto error;
    743754        }
    744755    }
Note: See TracChangeset for help on using the changeset viewer.