|
@@ -879,7 +879,7 @@ type
|
|
function AddRepeatUntil: TPasImplRepeatUntil;
|
|
function AddRepeatUntil: TPasImplRepeatUntil;
|
|
function AddIfElse(const ACondition: TPasExpr): TPasImplIfElse;
|
|
function AddIfElse(const ACondition: TPasExpr): TPasImplIfElse;
|
|
function AddWhileDo(const ACondition: TPasExpr): TPasImplWhileDo;
|
|
function AddWhileDo(const ACondition: TPasExpr): TPasImplWhileDo;
|
|
- function AddWithDo(const Expression: string): TPasImplWithDo;
|
|
|
|
|
|
+ function AddWithDo(const Expression: TPasExpr): TPasImplWithDo;
|
|
function AddCaseOf(const Expression: string): TPasImplCaseOf;
|
|
function AddCaseOf(const Expression: string): TPasImplCaseOf;
|
|
function AddForLoop(AVar: TPasVariable;
|
|
function AddForLoop(AVar: TPasVariable;
|
|
const AStartValue, AEndValue: TPasExpr): TPasImplForLoop;
|
|
const AStartValue, AEndValue: TPasExpr): TPasImplForLoop;
|
|
@@ -960,9 +960,9 @@ type
|
|
constructor Create(const AName: string; AParent: TPasElement); override;
|
|
constructor Create(const AName: string; AParent: TPasElement); override;
|
|
destructor Destroy; override;
|
|
destructor Destroy; override;
|
|
procedure AddElement(Element: TPasImplElement); override;
|
|
procedure AddElement(Element: TPasImplElement); override;
|
|
- procedure AddExpression(const Expression: string);
|
|
|
|
|
|
+ procedure AddExpression(const Expression: TPasExpr);
|
|
public
|
|
public
|
|
- Expressions: TStrings;
|
|
|
|
|
|
+ Expressions: TFPList;
|
|
Body: TPasImplElement;
|
|
Body: TPasImplElement;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1971,7 +1971,7 @@ begin
|
|
AddElement(Result);
|
|
AddElement(Result);
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TPasImplBlock.AddWithDo(const Expression: string): TPasImplWithDo;
|
|
|
|
|
|
+function TPasImplBlock.AddWithDo(const Expression: TPasExpr): TPasImplWithDo;
|
|
begin
|
|
begin
|
|
Result := TPasImplWithDo.Create('', Self);
|
|
Result := TPasImplWithDo.Create('', Self);
|
|
Result.AddExpression(Expression);
|
|
Result.AddExpression(Expression);
|
|
@@ -2822,13 +2822,17 @@ end;
|
|
constructor TPasImplWithDo.Create(const AName: string; AParent: TPasElement);
|
|
constructor TPasImplWithDo.Create(const AName: string; AParent: TPasElement);
|
|
begin
|
|
begin
|
|
inherited Create(AName, AParent);
|
|
inherited Create(AName, AParent);
|
|
- Expressions:=TStringList.Create;
|
|
|
|
|
|
+ Expressions:=TFPList.Create;
|
|
end;
|
|
end;
|
|
|
|
|
|
destructor TPasImplWithDo.Destroy;
|
|
destructor TPasImplWithDo.Destroy;
|
|
|
|
+Var
|
|
|
|
+ I : Integer;
|
|
begin
|
|
begin
|
|
if Assigned(Body) then
|
|
if Assigned(Body) then
|
|
Body.Release;
|
|
Body.Release;
|
|
|
|
+ For I:=0 to Expressions.Count-1 do
|
|
|
|
+ TObject(Expressions[i]).Free;
|
|
FreeAndNil(Expressions);
|
|
FreeAndNil(Expressions);
|
|
inherited Destroy;
|
|
inherited Destroy;
|
|
end;
|
|
end;
|
|
@@ -2843,7 +2847,7 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TPasImplWithDo.AddExpression(const Expression: string);
|
|
|
|
|
|
+procedure TPasImplWithDo.AddExpression(const Expression: TPasExpr);
|
|
begin
|
|
begin
|
|
Expressions.Add(Expression);
|
|
Expressions.Add(Expression);
|
|
end;
|
|
end;
|