sphinx-vhdl icon indicating copy to clipboard operation
sphinx-vhdl copied to clipboard

Make a parser more clever

Open yangyt96 opened this issue 9 months ago • 0 comments

package math_pack is

    -- This function calculates the base 2 logarithm of a number.
    --
    -- .. vhdl:parameters:: log2
    --
    --     a : in unsigned
    --         The number of which to calculate the logarithm
    function log2 parameter (a : unsigned) return integer;
end package math_pack;

It seems quite redundant for the user to write "in unsigned" in the comment because the definition of function has already told everything.

Cwn we make the tool more clever without writing the "in unsigned" and it can automatically extract it from the function definition?

package math_pack is

    -- This function calculates the base 2 logarithm of a number.
    --
    -- .. vhdl:parameters:: log2
    --
    --     a : The number of which to calculate the logarithm
    function log2 parameter (a : unsigned) return integer;
end package math_pack;

yangyt96 avatar May 14 '25 10:05 yangyt96