sphinx-vhdl
sphinx-vhdl copied to clipboard
Make a parser more clever
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;