<unit name="ok_hint_directives" deprecated="true" platform="true" library="true">
  <description><abstract>Test parsing &quot;platform&quot;, &quot;library&quot; and &quot;deprecated&quot; directives (called collectively &quot;hint directives&quot;) by pasdoc.</abstract><detailed> Related tracker bug: [ 1196073 ] &quot;some modifiers are not parsed&quot;. We want to support all situations where these directives are allowed in modern FPC (&gt;= 2.5.1) and Delphi. Their placement in unfortunately not consistent, thanks go to Borland. Quoting Delphi help (from Kylix 3): &quot;Hint directives can be applied to type declarations, variable declarations, class and structure declarations, field declarations within classes or records, procedure, function and method declarations, and unit declarations.&quot; Summary: 

<orderedlist>
<item> Between &quot;unit UnitName&quot; and hints you <italic>mustn't</italic> put any semicolon, and you <italic>mustn't</italic> put any semicolons between hints.  Same thing for CIOs (Classes / Interfaces / Objects / Records).  Same thing for CIOs fields.  Same thing for variables.  Same thing for constants.</item>
<item> Between &quot;procedure/function Name (...)&quot; and hints you <italic>must</italic> put a semicolon, and semicolons between hints are allowed but not required. It seems that you can't specify &quot;library&quot; directive for procedures/functions -- why? Probably because &quot;library&quot; is a keyword and Borland was unable to correctly modify it's compiler to parse such thing. But pasdoc parses library directive correctly.</item>
<item> Between method and hints you <italic>must</italic> put a semicolon, and semicolon between hints is <italic>required</italic>. You can specify &quot;library&quot; directive for methods.</item>
</orderedlist>

 I'm unable to figure out how to specify these hints for normal (non-structural) types. If anyone can 

<unorderedlist>
<item>tell me how to specify hint directives for non-structural types or</item>
<item>explain why parsing these directives is so weird and inconsistent in Delphi or</item>
<item>point me to some precise documentation by Borland specifying grammar rules with these directives</item>
</unorderedlist>

 ... then please send email about this to pasdoc-main mailing list (or directly to me, Michalis Kamburelis, &lt;kambi@users.sourceforge.net&gt;, if your comments about this do not really concern pasdoc). I will be grateful. Contrary to most units in tests/, this unit <italic>is</italic> kept at compileable by Delphi/Kylix and FPC. That's because this unit is also a test whether we really specify here hint directives in the way parseable by Delphi/Kylix.</detailed></description>
  <routine name="TestFuncCombined" declaration="function TestFuncCombined(SomeParams: Integer): Integer; deprecated; platform;" deprecated="true" platform="true" type="function">
  </routine>
  <routine name="TestFuncDeprecated" declaration="function TestFuncDeprecated: Integer; deprecated;" deprecated="true" type="function">
  </routine>
  <routine name="TestFuncPlatform" declaration="function TestFuncPlatform: Integer; platform;" platform="true" type="function">
  </routine>
  <routine name="TestProcCombined" declaration="procedure TestProcCombined(SomeParams: Integer); deprecated  platform;" deprecated="true" platform="true" type="procedure">
  </routine>
  <routine name="TestProcDeprecated" declaration="procedure TestProcDeprecated; deprecated;" deprecated="true" type="procedure">
  </routine>
  <routine name="TestProcExperimental" declaration="procedure TestProcExperimental; experimental;" experimental="true" type="procedure">
  </routine>
  <routine name="TestProcPlatform" declaration="procedure TestProcPlatform; platform;" platform="true" type="procedure">
  </routine>
  <routine name="TestProcUnimplemented" declaration="procedure TestProcUnimplemented; unimplemented;" unimplemented="true" type="procedure">
  </routine>
  <constant name="TestConstPlatform" declaration="TestConstPlatform = 1 platform;" platform="true">
  </constant>
  <constant name="TestConstLibrary" declaration="TestConstLibrary = 2 library;" library="true">
  </constant>
  <constant name="TestConstDeprecated" declaration="TestConstDeprecated = 3 deprecated;" deprecated="true">
  </constant>
  <constant name="TestConstCombined" declaration="TestConstCombined = 4 deprecated library platform;" deprecated="true" platform="true" library="true">
  </constant>
  <variable name="TestVarPlatform" declaration="TestVarPlatform: Integer platform;" platform="true">
  </variable>
  <variable name="TestVarLibrary" declaration="TestVarLibrary: Integer library;" library="true">
  </variable>
  <variable name="TestVarDeprecated" declaration="TestVarDeprecated: Integer deprecated;" deprecated="true">
  </variable>
  <variable name="TestVarCombined" declaration="TestVarCombined: Integer library deprecated platform;" deprecated="true" platform="true" library="true">
  </variable>
  <structure name="TTestClassDeprecated" deprecated="true" library="true" name_with_generic="TTestClassDeprecated" type="class">
    <ancestor name="TObject" declaration="TObject" />
    <routine name="TestMethodCombined" declaration="procedure TestMethodCombined; library; deprecated; platform;" visibility="public" deprecated="true" platform="true" library="true" type="procedure">
    </routine>
    <routine name="TestMethodDeprecated" declaration="procedure TestMethodDeprecated; deprecated;" visibility="public" deprecated="true" type="procedure">
    </routine>
    <routine name="TestMethodLibrary" declaration="procedure TestMethodLibrary; library;" visibility="public" library="true" type="procedure">
    </routine>
    <routine name="TestMethodPlatform" declaration="procedure TestMethodPlatform; platform;" visibility="public" platform="true" type="procedure">
    </routine>
    <variable name="TestFieldCombined" declaration="TestFieldCombined: Integer library deprecated platform;" visibility="public" deprecated="true" platform="true" library="true">
    </variable>
    <variable name="TestFieldDeprecated" declaration="TestFieldDeprecated: Integer deprecated;" visibility="public" deprecated="true">
    </variable>
    <variable name="TestFieldLibrary" declaration="TestFieldLibrary: Integer library;" visibility="public" library="true">
    </variable>
    <variable name="TestFieldPlatform" declaration="TestFieldPlatform: Integer platform;" visibility="public" platform="true">
    </variable>
    <property name="TestPropertyCombined" declaration="property TestPropertyCombined: Integer read Field; library deprecated platform;" visibility="public" deprecated="true" platform="true" library="true" indexdecl="" type="Integer" reader="Field" writer="" default_in_class="False" default_value="" nodefault="False"   stored="">
      <description><abstract>Testing on FPC 2.6.0: Hint directives for properties are allowed Ok.</abstract><detailed> I don't know if this is Delphi-compatible or FPC extension, anyway PasDoc supports it too.</detailed></description>
    </property>
    <property name="TestPropertyCombined2" declaration="property TestPropertyCombined2: Integer read Field; library; deprecated; platform;" visibility="public" deprecated="true" platform="true" library="true" indexdecl="" type="Integer" reader="Field" writer="" default_in_class="False" default_value="" nodefault="False"   stored="">
    </property>
  </structure>
  <structure name="TTestRecordDeprecated" deprecated="true" name_with_generic="TTestRecordDeprecated" type="record">
    <variable name="TestFieldPlatform" declaration="TestFieldPlatform: Integer platform;" visibility="public" platform="true">
    </variable>
  </structure>
</unit>
