Changeset 232 for branches/xpascal/Optimizer.pas
- Timestamp:
- Jun 26, 2023, 12:51:06 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/xpascal/Optimizer.pas
r231 r232 55 55 Obj: TObject; 56 56 TempNewNode: TSourceNode; 57 ListValue: TSourceNodeList<TSourceNode>; 57 58 begin 58 59 NewNode := nil; 59 if SourceNode = nil then begin60 end else61 if SourceNode is TSourceNodeList<TSourceNode> then begin62 OptimizeNodes(TSourceNodeList<TSourceNode>(SourceNode), NewNode)63 end else64 60 if (ofReplaceRepeatUntilByWhileDo in Features) and (SourceNode is TRepeatUntil) then begin 65 61 WhileDo := TWhileDo.Create; … … 113 109 end else 114 110 raise Exception.Create(SUnsupportedNodeType); 111 112 for I := 0 to SourceNode.FieldsCount - 1 do begin 113 Field := SourceNode.GetField(I); 114 if Field.DataType = dtList then begin 115 SourceNode.GetValue(I, ListValue); 116 OptimizeNodes(TSourceNodeList<TSourceNode>(ListValue), NewNode) 117 end; 118 end; 115 119 end; 116 120
Note:
See TracChangeset
for help on using the changeset viewer.