diff --git a/bindings/pascocoa/parser/ObjCParserTypes.pas b/bindings/pascocoa/parser/ObjCParserTypes.pas index 0d0078e62..206186846 100755 --- a/bindings/pascocoa/parser/ObjCParserTypes.pas +++ b/bindings/pascocoa/parser/ObjCParserTypes.pas @@ -956,7 +956,8 @@ begin if s = '#define' then df := TCPrepDefine.Create(nil) else if s = '#include' 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 = '#pragma' then df := TCPrepPragma.Create(nil) else df := nil; @@ -1773,7 +1774,6 @@ var begin Result := false; if not AParser.FindNextToken(_Directive, tt) then begin - AParser.Index := AParser.TokenPos; AParser.SetError('precompiler directive not found'); Exit; end; diff --git a/bindings/pascocoa/parser/objcparser.pas b/bindings/pascocoa/parser/objcparser.pas index 7544f58b8..28b7ff4eb 100755 --- a/bindings/pascocoa/parser/objcparser.pas +++ b/bindings/pascocoa/parser/objcparser.pas @@ -161,6 +161,8 @@ begin try parser.Buf := s; try + parser.UsePrecompileEntities := false; + parser.UseCommentEntities := false; parser.OnPrecompile := prec.OnPrecompile; parser.OnComment := prec.OnComment; parser.IgnoreTokens.AddStrings(ConvertSettings.IgnoreTokens);