Skip to content

Commit 343a1dd

Browse files
committed
origin: Minimize differences in Scanner
1 parent 8e10db2 commit 343a1dd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

origin/Scanner.pas

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ procedure omin_spacje(var i: Integer; var a: String);
2323

2424
implementation
2525

26-
uses SysUtils, Common, Messages, SplitString;
26+
uses SysUtils, Common, Messages, Optimize, SplitString;
2727

2828
// ----------------------------------------------------------------------------
2929

@@ -37,44 +37,44 @@ procedure TokenizeProgramInitialization;
3737
i: Integer;
3838
begin
3939

40+
NumTok := 0;
41+
NumIdent := 0;
4042
fillchar(Ident, sizeof(Ident), 0);
4143
fillchar(DataSegment, sizeof(DataSegment), 0);
42-
fillchar(StaticStringData, sizeof(StaticStringData), 0);
4344

4445
PublicSection := True;
4546
UnitNameIndex := 1;
4647

4748
SetLength(WithName, 1);
4849
SetLength(linkObj, 1);
4950
SetLength(resArray, 1);
51+
5052
SetLength(msgUser, 1);
5153
SetLength(msgWarning, 1);
5254
SetLength(msgNote, 1);
5355

5456
NumBlocks := 0;
5557
BlockStackTop := 0;
5658
CodeSize := 0;
57-
CodePosStackTop := 0; // SetVarDataSize(0,0);
59+
CodePosStackTop := 0;
5860
CaseCnt := 0;
5961
IfCnt := 0;
6062
ShrShlCnt := 0;
6163
NumTypes := 0;
6264
run_func := 0;
6365
NumProc := 0;
64-
NumTok := 0;
65-
NumIdent := 0;
6666

67+
fillchar(StaticStringData, sizeof(StaticStringData), 0);
6768
NumStaticStrChars := 0;
6869

6970
IfdefLevel := 0;
7071
AsmBlockIndex := 0;
7172

7273
NumDefines := AddDefines;
7374

74-
optyA := '';
75-
optyY := '';
76-
optyBP2 := '';
75+
ResetOpty;
7776

77+
// Do NOT put this into ResetOpty!
7878
optyFOR0 := '';
7979
optyFOR1 := '';
8080
optyFOR2 := '';

0 commit comments

Comments
 (0)