lit
only interprets two valid constructs:
A macro definition: << ... >>=
and a macro reference: << ... >>
Any lines sharing or to the right of the initial indent, are included in the definition. A macro definition is where the actual source code is placed. It can also contain macro references.
It is also possible to extend a macro definition by creating a macro definition with the same name later in the literate file.
When lit
attempts to generate the source code from the literate file, it expands each
macro reference with the corresponding macro definition. By convention, lit
starts at the root macro
definition << * >>=
. If it is not included, lit
assumes the first macro definition as the index.
For a simple tutorial, follow here.