VAR
combinedTok,
arrayTok,
- exprTok : CARDINAL ;
- e, t, d,
+ exprTok : CARDINAL ;
+ e, type, dim,
+ result,
Sym,
- Type : CARDINAL ;
+ Type : CARDINAL ;
BEGIN
- IF IsConst (OperandT (2)) AND IsConstructor (OperandT (2))
+ IF IsConst (OperandT (2))
THEN
- t := GetDType (OperandT (2)) ;
- IF t = NulSym
+ type := GetDType (OperandT (2)) ;
+ IF type = NulSym
THEN
- InternalError ('constructor type should have been resolved')
- ELSIF IsArray (t)
+ InternalError ('constant type should have been resolved')
+ ELSIF IsArray (type)
THEN
PopTtok (e, exprTok) ;
- PopTFDtok (Sym, Type, d, arrayTok) ;
- t := MakeTemporary (exprTok, RightValue) ;
- PutVar (t, Type) ;
- PushTFtok (t, GetSType(t), exprTok) ;
+ PopTFDtok (Sym, Type, dim, arrayTok) ;
+ result := MakeTemporary (exprTok, RightValue) ;
+ PutVar (result, Type) ;
+ PushTFtok (result, GetSType (result), exprTok) ;
PushTtok (Sym, arrayTok) ;
combinedTok := MakeVirtualTok (arrayTok, arrayTok, exprTok) ;
- PutVarConst (t, TRUE) ;
+ PutVarConst (result, TRUE) ;
BuildAssignConstant (combinedTok) ;
- PushTFDtok (t, GetDType(t), d, arrayTok) ;
+ PushTFDtok (result, GetDType (result), dim, arrayTok) ;
PushTtok (e, exprTok)
END
END ;