|
@@ -139,7 +139,6 @@ interface
|
|
ignoredirectives : TFPHashList; { ignore directives, used to give warnings only once }
|
|
ignoredirectives : TFPHashList; { ignore directives, used to give warnings only once }
|
|
preprocstack : tpreprocstack;
|
|
preprocstack : tpreprocstack;
|
|
replaystack : treplaystack;
|
|
replaystack : treplaystack;
|
|
- in_asm_string : boolean;
|
|
|
|
|
|
|
|
preproc_pattern : string;
|
|
preproc_pattern : string;
|
|
preproc_token : ttoken;
|
|
preproc_token : ttoken;
|
|
@@ -215,9 +214,9 @@ interface
|
|
function readstatedefault:char;
|
|
function readstatedefault:char;
|
|
procedure skipspace;
|
|
procedure skipspace;
|
|
procedure skipuntildirective;
|
|
procedure skipuntildirective;
|
|
- procedure skipcomment;
|
|
|
|
|
|
+ procedure skipcomment(read_first_char:boolean);
|
|
procedure skipdelphicomment;
|
|
procedure skipdelphicomment;
|
|
- procedure skipoldtpcomment;
|
|
|
|
|
|
+ procedure skipoldtpcomment(read_first_char:boolean);
|
|
procedure readtoken(allowrecordtoken:boolean);
|
|
procedure readtoken(allowrecordtoken:boolean);
|
|
function readpreproc:ttoken;
|
|
function readpreproc:ttoken;
|
|
function asmgetchar:char;
|
|
function asmgetchar:char;
|
|
@@ -2649,7 +2648,6 @@ type
|
|
lasttoken:=NOTOKEN;
|
|
lasttoken:=NOTOKEN;
|
|
nexttoken:=NOTOKEN;
|
|
nexttoken:=NOTOKEN;
|
|
ignoredirectives:=TFPHashList.Create;
|
|
ignoredirectives:=TFPHashList.Create;
|
|
- in_asm_string:=false;
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -4373,7 +4371,7 @@ type
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
- skipoldtpcomment;
|
|
|
|
|
|
+ skipoldtpcomment(false);
|
|
next_char_loaded:=true;
|
|
next_char_loaded:=true;
|
|
end;
|
|
end;
|
|
end
|
|
end
|
|
@@ -4410,10 +4408,11 @@ type
|
|
Comment Handling
|
|
Comment Handling
|
|
****************************************************************************}
|
|
****************************************************************************}
|
|
|
|
|
|
- procedure tscannerfile.skipcomment;
|
|
|
|
|
|
+ procedure tscannerfile.skipcomment(read_first_char:boolean);
|
|
begin
|
|
begin
|
|
current_commentstyle:=comment_tp;
|
|
current_commentstyle:=comment_tp;
|
|
- readchar;
|
|
|
|
|
|
+ if read_first_char then
|
|
|
|
+ readchar;
|
|
inc_comment_level;
|
|
inc_comment_level;
|
|
{ handle compiler switches }
|
|
{ handle compiler switches }
|
|
if (c='$') then
|
|
if (c='$') then
|
|
@@ -4458,7 +4457,7 @@ type
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
- procedure tscannerfile.skipoldtpcomment;
|
|
|
|
|
|
+ procedure tscannerfile.skipoldtpcomment(read_first_char:boolean);
|
|
var
|
|
var
|
|
found : longint;
|
|
found : longint;
|
|
begin
|
|
begin
|
|
@@ -4466,7 +4465,7 @@ type
|
|
inc_comment_level;
|
|
inc_comment_level;
|
|
{ only load a char if last already processed,
|
|
{ only load a char if last already processed,
|
|
was cause of bug1634 PM }
|
|
was cause of bug1634 PM }
|
|
- if c=#0 then
|
|
|
|
|
|
+ if read_first_char then
|
|
readchar;
|
|
readchar;
|
|
{ this is now supported }
|
|
{ this is now supported }
|
|
if (c='$') then
|
|
if (c='$') then
|
|
@@ -4574,7 +4573,7 @@ type
|
|
repeat
|
|
repeat
|
|
case c of
|
|
case c of
|
|
'{' :
|
|
'{' :
|
|
- skipcomment;
|
|
|
|
|
|
+ skipcomment(true);
|
|
#26 :
|
|
#26 :
|
|
begin
|
|
begin
|
|
reload;
|
|
reload;
|
|
@@ -4813,8 +4812,7 @@ type
|
|
case c of
|
|
case c of
|
|
'*' :
|
|
'*' :
|
|
begin
|
|
begin
|
|
- c:=#0;{Signal skipoldtpcomment to reload a char }
|
|
|
|
- skipoldtpcomment;
|
|
|
|
|
|
+ skipoldtpcomment(true);
|
|
readtoken(false);
|
|
readtoken(false);
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
@@ -5498,11 +5496,6 @@ exit_label:
|
|
function tscannerfile.asmgetchar : char;
|
|
function tscannerfile.asmgetchar : char;
|
|
begin
|
|
begin
|
|
readchar;
|
|
readchar;
|
|
- if in_asm_string then
|
|
|
|
- begin
|
|
|
|
- asmgetchar:=c;
|
|
|
|
- exit;
|
|
|
|
- end;
|
|
|
|
repeat
|
|
repeat
|
|
case c of
|
|
case c of
|
|
#26 :
|
|
#26 :
|