Any contract, interface, library, event definition, struct definition, function, or contract variable may have tags associated with them. These are used for generating documentation for the contracts, when Solang is run with the --doc command line option. This option generates some html which lists all the types, contracts, functions, and state variables along with their tags.

The tags use a special comment format. They can either be specified in block comments or single line comments.

 * @title Hello, World!
 * @notice Just an example.
 * @author Sean Young <sean@mess.org>
contract c {
    /// @param name The name which will be greeted
    function say_hello(string name) public {
        print(string.concat("Hello, ", name, "!"));

The tags which are allowed:


Headline for this unit


General body for explaining what this unit does


Any development notes


Field for the author of this code

@param name

Document a function parameter, field of struct or event. Requires a name of the field or parameter

@return name

Document a function return value. Requires a name of the field or parameter if the function returns more than one value.