Ignore:
Timestamp:
Apr 20, 2020, 1:10:44 AM (5 years ago)
Author:
chronos
Message:
  • Added: Support for repeat-until.
Location:
branches/interpreter2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/interpreter2

    • Property svn:ignore
      •  

        old new  
        44interpreter.res
        55heaptrclog.trc
         6Generated
  • branches/interpreter2/USource.pas

    r204 r205  
    117117  end;
    118118
     119  TCommands = class(TObjectList)
     120  end;
     121
    119122  { TFunctionCall }
    120123
     
    129132
    130133  TBeginEnd = class(TCommand)
    131     Commands: TObjectList;
     134    Commands: TCommands;
    132135    procedure Clear;
    133136    constructor Create;
     
    197200    Expression: TExpression;
    198201    Command: TCommand;
     202    constructor Create;
     203    destructor Destroy; override;
     204  end;
     205
     206  { TRepeatUntil }
     207
     208  TRepeatUntil = class(TCommand)
     209    Expression: TExpression;
     210    Commands: TCommands;
    199211    constructor Create;
    200212    destructor Destroy; override;
     
    243255implementation
    244256
     257{ TRepeatUntil }
     258
     259constructor TRepeatUntil.Create;
     260begin
     261  Expression := TExpression.Create;
     262  Commands := TCommands.Create;
     263end;
     264
     265destructor TRepeatUntil.Destroy;
     266begin
     267  Expression.Free;
     268  Commands.Free;
     269  inherited Destroy;
     270end;
     271
    245272{ TValueBoolean }
    246273
     
    579606constructor TBeginEnd.Create;
    580607begin
    581   Commands := TObjectList.Create;
     608  Commands := TCommands.Create;
    582609end;
    583610
Note: See TracChangeset for help on using the changeset viewer.