Tags
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("Hello, " + name + "!");
}
}
The tags which are allowed:
@titleHeadline for this unit
@noticeGeneral body for explaining what this unit does
@devAny development notes
@authorField for the author of this code
@paramnameDocument a function parameter, field of struct or event. Requires a name of the field or parameter
@returnnameDocument a function return value. Requires a name of the field or parameter if the function returns more than one value.