X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/e895be217c3be6769708da17c9ae87cb22db040e..00d59354c311fb28730b7c9b117b0d91aac092cc:/doc/syntax.tex diff --git a/doc/syntax.tex b/doc/syntax.tex index 72329a4..6c05acc 100644 --- a/doc/syntax.tex +++ b/doc/syntax.tex @@ -710,6 +710,27 @@ preprocessor directives in order to declare types and functions for use elsewhere in the generated output files. +\subsection{Static instance definitions} \label{sec:syntax.module.instance} + +\begin{grammar} + ::= + "instance" + @[":" $[\mbox{@}]$@] ";" + + ::= "." "=" +\end{grammar} + +Properties: +\begin{description} +\item[@"extern"] A boolean flag: if true, then the instance is public, and + will be declared in the output header file; if false (the default), then + the instance is only available to code defined within the module. +\item[@"const"] A boolean flag: if true (the default), then the instance is + read-only, and may end up in write-protected storage at run-time; if false, + then the instance will be writable. +\end{description} + + \subsection{Class definitions} \label{sec:syntax.module.class} \begin{grammar}