Fix ignoring directives.

This commit is contained in:
Rika Ichinose 2022-01-07 17:06:09 +03:00
parent bac7142256
commit a1411d437a

View File

@ -359,6 +359,7 @@ implementation
*****************************************************************************}
const
DirectiveIgnored=pointer(1);
{ use any special name that is an invalid file name to avoid problems }
preprocstring : array [preproctyp] of string[7]
= ('$IFDEF','$IFNDEF','$IF','$IFOPT','$ELSE','$ELSEIF');
@ -4527,7 +4528,7 @@ type
end
else
begin
current_scanner.ignoredirectives.Add(hs,nil);
current_scanner.ignoredirectives.Add(hs,DirectiveIgnored);
Message1(scan_w_illegal_directive,'$'+hs);
end;
{ conditionals already read the comment }