Changeset 37 for branches/DelphiToC/Analyze/UPascalParser.pas
- Timestamp:
- Aug 4, 2010, 4:10:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/Analyze/UPascalParser.pas
r36 r37 6 6 7 7 uses 8 Windows, Messages,SysUtils, Variants, Classes, Graphics, Controls, Forms,8 SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 9 Dialogs, StdCtrls, UPascalSource, FileUtil; 10 10 … … 183 183 var 184 184 I: Integer; 185 //II: Integer;185 II: Integer; 186 186 J: Integer; 187 187 const 188 188 SpecChar: set of char = [';', '.', ',', ':', '(', ')', '[', ']', '+', '-', '/', '*', 189 189 '^', '=', '<' , '>' , '@']; 190 DoubleSpecChar : array[ 1..7] of string = (':=', '..', '<=', '>=', '<>', '+=', '-=');190 DoubleSpecChar : array[0..6] of string = (':=', '..', '<=', '>=', '<>', '+=', '-='); 191 191 begin 192 192 Result := ''; … … 217 217 if (Text[J] in SpecChar) then begin 218 218 if (Text[J + 1] in SpecChar) then begin 219 for I := 0 to High(DoubleSpecChar) do220 if Copy(Text, J, 2) = DoubleSpecChar[I ] then begin219 for II := 0 to High(DoubleSpecChar) do 220 if Copy(Text, J, 2) = DoubleSpecChar[II] then begin 221 221 Result := Copy(Text, J, 2); 222 222 Inc(J, 2); … … 549 549 begin 550 550 with Parser do begin 551 if NextCode = 'program' then ParseProgram(Parser) 552 else if NextCode = 'unit' then ParseUnit(Parser) 551 if NextCode = 'program' then 552 ParseProgram(Parser) 553 else if NextCode = 'unit' then 554 ParseUnit(Parser) 553 555 else ParseProgram(Parser); 554 556 end;
Note:
See TracChangeset
for help on using the changeset viewer.