Ignore:
Timestamp:
Jun 26, 2023, 12:51:06 PM (17 months ago)
Author:
chronos
Message:
  • Fixed: Generation of var function parameters.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/xpascal/Source.pas

    r231 r232  
    4444
    4545  TType = class(TSourceNode)
    46   private
     46  protected
    4747    function GetFieldsCount: Integer; override;
    4848  public
     
    6767
    6868  TVariable = class(TSourceNode)
    69   private
     69  protected
    7070    function GetFieldsCount: Integer; override;
    7171  public
     
    8787
    8888  TConstant = class(TSourceNode)
    89   private
     89  protected
    9090    function GetFieldsCount: Integer; override;
    9191  public
     
    124124
    125125  TFunction = class(TSourceNode)
    126   private
     126  protected
    127127    function GetFieldsCount: Integer; override;
    128128  public
     
    160160
    161161  TFunctionCall = class(TCommand)
    162   private
     162  protected
    163163    function GetFieldsCount: Integer; override;
    164164  public
     
    175175
    176176  TBeginEnd = class(TCommand)
    177   private
     177  protected
    178178    function GetFieldsCount: Integer; override;
    179179  public
     
    200200
    201201  TExpressionOperation = class(TExpression)
    202   private
     202  protected
    203203    function GetFieldsCount: Integer; override;
    204204  public
     
    222222
    223223  TExpressionOperand = class(TExpression)
    224   private
     224  protected
    225225    function GetFieldsCount: Integer; override;
    226226  public
     
    255255
    256256  TAssignment = class(TCommand)
    257   private
     257  protected
    258258    function GetFieldsCount: Integer; override;
    259259  public
     
    270270
    271271  TReturn = class(TCommand)
    272   private
     272  protected
    273273    function GetFieldsCount: Integer; override;
    274274  public
     
    284284
    285285  TIfThenElse = class(TCommand)
    286   private
     286  protected
    287287    function GetFieldsCount: Integer; override;
    288288  public
     
    305305
    306306  TWhileDo = class(TLoop)
    307   private
     307  protected
    308308    function GetFieldsCount: Integer; override;
    309309  public
     
    320320
    321321  TRepeatUntil = class(TLoop)
    322   private
     322  protected
    323323    function GetFieldsCount: Integer; override;
    324324  public
     
    341341
    342342  TForToDo = class(TLoop)
    343   private
     343  protected
    344344    function GetFieldsCount: Integer; override;
    345345  public
     
    358358
    359359  TBlock = class(TSourceNode)
    360   private
     360  protected
    361361    function GetFieldsCount: Integer; override;
    362362  public
     
    382382
    383383  TProgram = class(TSourceNode)
    384   private
     384  protected
    385385    function GetFieldsCount: Integer; override;
    386386  public
     
    571571begin
    572572  if Index = 0 then Result := TField.Create(dtObject, 'Expression')
    573   else if Index = 1 then Result := TField.Create(dtObject, 'Commands')
     573  else if Index = 1 then Result := TField.Create(dtList, 'Commands')
    574574  else inherited;
    575575end;
     
    779779begin
    780780  if Index = 0 then Result := TField.Create(dtObject, 'Block')
    781   else if Index = 1 then Result := TField.Create(dtObject, 'Parameters')
     781  else if Index = 1 then Result := TField.Create(dtList, 'Parameters')
    782782  else if Index = 2 then Result := TField.Create(dtObject, 'ResultType')
    783783  else if Index = 3 then Result := TField.Create(dtString, 'Name')
     
    11451145begin
    11461146  if Index = 0 then Result := TField.Create(dtObject, 'Block')
    1147   else if Index = 1 then Result := TField.Create(dtObject, 'Types')
    1148   else if Index = 2 then Result := TField.Create(dtObject, 'Variables')
    1149   else if Index = 3 then Result := TField.Create(dtObject, 'Constants')
    1150   else if Index = 4 then Result := TField.Create(dtObject, 'Functions')
     1147  else if Index = 1 then Result := TField.Create(dtList, 'Types')
     1148  else if Index = 2 then Result := TField.Create(dtList, 'Variables')
     1149  else if Index = 3 then Result := TField.Create(dtList, 'Constants')
     1150  else if Index = 4 then Result := TField.Create(dtList, 'Functions')
    11511151  else inherited;
    11521152end;
     
    12371237function TBeginEnd.GetField(Index: Integer): TField;
    12381238begin
    1239   if Index = 0 then Result := TField.Create(dtObject, 'Command')
     1239  if Index = 0 then Result := TField.Create(dtList, 'Command')
    12401240  else inherited;
    12411241end;
Note: See TracChangeset for help on using the changeset viewer.