pawn-lang / compiler

Pawn compiler for SA-MP with bug fixes and new features - runs on Windows, Linux, macOS
Other
306 stars 72 forks source link

Don't generate pawndoc for unimpemented functions #675

Open Y-Less opened 3 years ago

Y-Less commented 3 years ago

Issue description:

A forwarded function with no implementation will still be placed in the XML file with -r. Since these functions don't actually exist and can't be called, I don't think they should appear in the documentation. Only implemented functions (including those that are unused) should.

Minimal complete verifiable example (MCVE):

forward Unused();

main() {}

Output:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="file:///C|/Users/Alex/Documents/SA-MP/pawno/xml/pawndoc.xsl" type="text/xsl"?>
<doc source="C:\Users\Alex\Documents\SA-MP\gamemodes\unused.pwn">
    <assembly>
        <name>unused.pwn</name>
    </assembly>
    <members>

        <!-- enumerations -->

        <!-- constants -->

        <!-- variables -->
        <member name="F:__date">
        </member>
        <member name="F:__file">
        </member>
        <member name="F:__time">
        </member>

        <!-- functions -->
        <member name="M:Unused" syntax="Unused()">
            <stacksize value="1"/>
        </member>
        <member name="M:main" syntax="main()">
            <attribute name="entry"/>
            <stacksize value="1"/>
        </member>

    </members>
</doc>

Workspace Information:

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity.