Changeset 18 for branches/Void/Generators
- Timestamp:
- Nov 10, 2009, 3:38:32 PM (15 years ago)
- Location:
- branches/Void
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Void
- Property svn:ignore
-
old new 11 11 Output.dpr 12 12 Output.exe 13 Output.asm
-
- Property svn:ignore
-
branches/Void/Generators/UCGenerator.pas
r16 r18 70 70 // Variable section 71 71 for I := 0 to Variables.Count - 1 do 72 with TVariable(Variables[I])do72 with Variables[I] do 73 73 Output.Add(Indent + ConvertType(VarType.Name) + ' ' + Name + ';'); 74 74 if Variables.Count > 0 then Output.Add(''); … … 76 76 // Code block 77 77 for I := 0 to BeginEnd.Commands.Count - 1 do 78 with TCommand(BeginEnd.Commands[I])do begin78 with BeginEnd.Commands[I] do begin 79 79 if Name = 'Assignment' then Output.Add(Indent + 80 TVariableValue(Parameters[0]).VariableDef.Name + ' = ' +80 Parameters[0].VariableDef.Name + ' = ' + 81 81 GenerateVariableValue(TVariableValue(Parameters[1])) + ';') 82 82 else begin -
branches/Void/Generators/UPascalGenerator.pas
r16 r18 55 55 Inc(IndentCount); 56 56 for I := 0 to Variables.Count - 1 do 57 with TVariable(Variables[I])do57 with Variables[I] do 58 58 Output.Add(Indent + Name + ': ' + VarType.Name + ';'); 59 59 Dec(IndentCount); … … 63 63 Inc(IndentCount); 64 64 for I := 0 to BeginEnd.Commands.Count - 1 do 65 with TCommand(BeginEnd.Commands[I])do begin65 with BeginEnd.Commands[I] do begin 66 66 if Name = 'Assignment' then Output.Add(Indent + 67 TVariableValue(Parameters[0]).VariableDef.Name + ' := ' +67 Parameters[0].VariableDef.Name + ' := ' + 68 68 GenerateVariableValue(TVariableValue(Parameters[1])) + ';') 69 69 else begin -
branches/Void/Generators/UZ80Generator.pas
r16 r18 51 51 // var section 52 52 for I := 0 to Variables.Count - 1 do 53 with TVariable(Variables[I])do53 with Variables[I] do 54 54 Output.Add(Name + ': DB ' + VarType.Name + ';'); 55 55 … … 58 58 Inc(IndentCount); 59 59 for I := 0 to BeginEnd.Commands.Count - 1 do 60 with TCommand(BeginEnd.Commands[I])do begin60 with BeginEnd.Commands[I] do begin 61 61 if Name = 'Assignment' then Output.Add(' LD ' + 62 TVariableValue(Parameters[0]).VariableDef.Name + ', ' +62 Parameters[0].VariableDef.Name + ', ' + 63 63 GenerateVariableValue(TVariableValue(Parameters[1]))) 64 64 else begin
Note:
See TracChangeset
for help on using the changeset viewer.