From 2dfc304bcfbab5b12a877b75a6f0b2faeec6ca7b Mon Sep 17 00:00:00 2001 From: skalogryz Date: Mon, 26 Jan 2009 09:17:47 +0000 Subject: [PATCH] + fixed to write out preceding header file comments git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@675 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- bindings/pascocoa/parser/ObjCParserUtils.pas | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/bindings/pascocoa/parser/ObjCParserUtils.pas b/bindings/pascocoa/parser/ObjCParserUtils.pas index de8bc207f..66d0dab8d 100755 --- a/bindings/pascocoa/parser/ObjCParserUtils.pas +++ b/bindings/pascocoa/parser/ObjCParserUtils.pas @@ -565,7 +565,7 @@ var j : integer; begin if (Index < 0) or (Index >= Items.Count) then Exit; - + j := Index; while (j >= 0) and (TObject(Items[j]) is TComment) do dec(j); inc(j); @@ -1143,15 +1143,17 @@ begin for i := 0 to hdr.Items.Count - 1 do if Assigned(hdr.Items[i]) then begin - if (TObject(hdr.Items[i]) is TEnumTypeDef) then begin - WriteOutIfComment(hdr.Items, i - 1, SpacePrefix, subs); - WriteOutEnumToHeader(TEnumTypeDef(hdr.Items[i]), subs); - end else if (TObject(hdr.Items[i]) is TPrecompiler) then begin - WriteOutIfDefPrecompiler(TPrecompiler(hdr.Items[i]), SpacePrefix, st); - end else if (TObject(hdr.Items[i]) is TTypeNameDef) then begin - WriteOutTypeDefToHeader(TTypeNameDef(hdr.Items[i]), SpacePrefix, subs); - end else if (TObject(hdr.Items[i]) is TSkip) then - subs.Add('//'+ TSkip(hdr.Items[i])._Skip); + if (TObject(hdr.Items[i]) is TEnumTypeDef) then + WriteOutEnumToHeader(TEnumTypeDef(hdr.Items[i]), subs) + else if (TObject(hdr.Items[i]) is TPrecompiler) then + WriteOutIfDefPrecompiler(TPrecompiler(hdr.Items[i]), SpacePrefix, st) + else if (TObject(hdr.Items[i]) is TTypeNameDef) then + WriteOutTypeDefToHeader(TTypeNameDef(hdr.Items[i]), SpacePrefix, subs) + else if (TObject(hdr.Items[i]) is TSkip) then + subs.Add('//'+ TSkip(hdr.Items[i])._Skip) + else if (TObject(hdr.Items[i]) is TComment) then + //WriteOutIfComment(hdr.Items, i, SpacePrefix, subs); + WriteOutCommentStr( TComment(hdr.Items[i])._Comment, SpacePrefix, Subs); end; {of if} st.add('');