Пример #1
0
 public override void gen(int begin, int after)
 {
     if (Parent.Params.ReturnType != ReserveType.Void)
     {
         if (!ReserveType.ConvertableT1T2(Parent.Params.ReturnType, ReturnVal.Type))
         {
             throw new TypeMisMatchException(this.lexline, ReturnVal.Type, Parent.Params.ReturnType.ToString());
         }
         Temp t = new Temp(Parent.Params.ReturnType);
         CurrentGenerator.Temp(t);
         new Set(t, ReturnVal).gen(begin, after);
         CurrentGenerator.Return(t);
     }
     else
     {
         CurrentGenerator.Return(null);
     }
     //emitLabel(Parent.ExitLabel);
 }