Changeset 20 for branches/DelphiToC/UMainForm.pas
- Timestamp:
- Sep 8, 2009, 2:01:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/UMainForm.pas
r19 r20 65 65 NewNode: TTreeNode; 66 66 NewNode2: TTreeNode; 67 NewNode3: TTreeNode; 67 68 ModuleNode: TTreeNode; 68 69 I: Integer; 70 II: Integer; 69 71 M: Integer; 70 72 begin … … 82 84 NewNode := AddChild(ModuleNode, 'Funkce'); 83 85 for I := 0 to Methods.Count - 1 do 84 with TFunction(Methods[I]) do 86 with TFunction(Methods[I]) do begin 85 87 NewNode2 := AddChild(NewNode, Name); 88 with NewNode2 do begin 89 NewNode3 := AddChild(NewNode2, 'Parametery'); 90 for II := 0 to Parameters.Count - 1 do 91 AddChild(NewNode3, TParameter(Parameters[II]).Name + ':' + TParameter(Parameters[II]).ValueType.Name); 92 end; 93 end; 86 94 NewNode := AddChild(ModuleNode, 'Promìnné'); 87 95 for I := 0 to Variables.Count - 1 do 88 96 with TVariable(Variables[I]) do 89 NewNode2 := AddChild(NewNode, Name );97 NewNode2 := AddChild(NewNode, Name + ':' + ValueType.Name); 90 98 NewNode := AddChild(ModuleNode, 'Konstanty'); 91 99 for I := 0 to Constants.Count - 1 do 92 100 with TConstant(Constants[I]) do 93 NewNode2 := AddChild(NewNode, Name );101 NewNode2 := AddChild(NewNode, Name + ':' + ValueType.Name + '=' + Value); 94 102 NewNode := AddChild(ModuleNode, 'Program'); 103 for I := 0 to Code.Commands.Count - 1 do begin 104 if TObject(Code.Commands[I]) is TBeginEnd then begin 105 NewNode2 := AddChild(NewNode, 'Begin-End'); 106 107 end else 108 if TObject(Code.Commands[I]) is TWhileDo then begin 109 NewNode2 := AddChild(NewNode, 'While-Do'); 110 end else 111 if TObject(Code.Commands[I]) is TAssignment then begin 112 NewNode2 := AddChild(NewNode, TAssignment(Code.Commands[I]).Target.Name + ' := exp'); 113 114 end; 115 end; 116 95 117 end; 96 118 TopItem.Expand(True);
Note:
See TracChangeset
for help on using the changeset viewer.