The Lasso domain (ls:) provides directives for each language element, as well as corresponding roles for cross-referencing. See the domain docs for more detail on syntax.
Each directive populates the index.
Describes a type, trait, or thread. Member methods belonging to this element should be nested below or qualified with the element->member syntax.
Describes an unbound or member method. The member directive is intended for methods belonging to a type, although both directives are treated identically.
Describes a provide method for a trait or type. Prefixed with provide in output to distinguish from methods and members.
Although a type’s provide methods and import statements need to be inside a trait block in Lasso code, they can appear alongside member methods in reST markup.
Describes a require signature for a trait. Prefixed with require in output.
Every directive also supports the see or url option for adding links to more info, and the author or authors option for adding an attribution.
.. ls:type:: rhino
Description of the type
:parent: :ls:type:`mammal`
:import: :ls:trait:`trait_horned`
:see: http://en.wikipedia.org/wiki/Rhinoceros
.. ls:member:: numberOfHorns(species::string)::integer
Description of the member method
:param string species: Specifies which species
:return: The number of horns
Description of the type
Parent type: | mammal |
---|---|
Imports: | trait_horned |
See also: | http://en.wikipedia.org/wiki/Rhinoceros |
Cross-referencing is done with roles using the same syntax as other domains, except that member tag syntax using the arrow operator -> is used to associate types or traits with member methods, such as :meth:`bytes->getrange`. All other syntax follows what’s described in the domain docs.
Use the following roles to link to definitions of each element:
Reference a type member method, trait provide method, trait require signature, or unbound method. Be sure to include the enclosing type or trait if outside its description block.
The :ls:type:`Pair <pair>` type always contains two elements which are accessed
with the :ls:meth:`pair->first` and :ls:meth:`~pair->second` methods.
The Pair type always contains two elements which are accessed with the pair->first and second methods.