You've already forked lazarus-ccr
+ fixed endless loop for last preprocessor directive, noted by Josef Ryan.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@676 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -956,7 +956,8 @@ begin
|
|||||||
if s = '#define' then df := TCPrepDefine.Create(nil)
|
if s = '#define' then df := TCPrepDefine.Create(nil)
|
||||||
else if s = '#include' then df := TCPrepInclude.Create(nil)
|
else if s = '#include' then df := TCPrepInclude.Create(nil)
|
||||||
else if s = '#else' then df := TCPrepInclude.Create(nil)
|
else if s = '#else' then df := TCPrepInclude.Create(nil)
|
||||||
else if s = '#endif' then df := TCPrepEndif.Create(nil)
|
else if s = '#endif' then
|
||||||
|
df := TCPrepEndif.Create(nil)
|
||||||
else if (s = '#if') or (s = '#elif') or (s = '#ifdef') or (s = '#ifndef') then df := TCPrepIf.Create(nil)
|
else if (s = '#if') or (s = '#elif') or (s = '#ifdef') or (s = '#ifndef') then df := TCPrepIf.Create(nil)
|
||||||
else if s = '#pragma' then df := TCPrepPragma.Create(nil)
|
else if s = '#pragma' then df := TCPrepPragma.Create(nil)
|
||||||
else df := nil;
|
else df := nil;
|
||||||
@ -1773,7 +1774,6 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := false;
|
Result := false;
|
||||||
if not AParser.FindNextToken(_Directive, tt) then begin
|
if not AParser.FindNextToken(_Directive, tt) then begin
|
||||||
AParser.Index := AParser.TokenPos;
|
|
||||||
AParser.SetError('precompiler directive not found');
|
AParser.SetError('precompiler directive not found');
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
@ -161,6 +161,8 @@ begin
|
|||||||
try
|
try
|
||||||
parser.Buf := s;
|
parser.Buf := s;
|
||||||
try
|
try
|
||||||
|
parser.UsePrecompileEntities := false;
|
||||||
|
parser.UseCommentEntities := false;
|
||||||
parser.OnPrecompile := prec.OnPrecompile;
|
parser.OnPrecompile := prec.OnPrecompile;
|
||||||
parser.OnComment := prec.OnComment;
|
parser.OnComment := prec.OnComment;
|
||||||
parser.IgnoreTokens.AddStrings(ConvertSettings.IgnoreTokens);
|
parser.IgnoreTokens.AddStrings(ConvertSettings.IgnoreTokens);
|
||||||
|
Reference in New Issue
Block a user