From 7119ea4ebe5d0bd756adfb12dde51a113ae408b0 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 26 May 2016 09:26:09 +0100 Subject: [PATCH] doc/syntax.tex: Replace `listing' environments with `prog'. --- doc/syntax.tex | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/syntax.tex b/doc/syntax.tex index 64b10f4..0b7456f 100644 --- a/doc/syntax.tex +++ b/doc/syntax.tex @@ -578,17 +578,17 @@ keyword arguments. A @ informs Sod that an @ will be used to name a class which is currently undefined. Forward declarations are necessary in order to resolve certain kinds of circularity. For example, -\begin{listing} +\begin{prog} class Sub; - -class Super : SodObject { - Sub *sub; -}; - -class Sub : Super { - /* ... */ -}; -\end{listing} +\\+ +class Super : SodObject \{ \\ \ind + Sub *sub; \- \\ +\}; +\\+ +class Sub : Super \{ \\ \ind + /* \dots */ \- \\ +\}; +\end{prog} \subsubsection{Full class definitions} \begin{grammar} @@ -664,20 +664,20 @@ functions are fine. An @, if present, is treated as if a separate @ containing the slot name and initializer were present. For example, -\begin{listing} -[nick = eg] -class Example : Super { - int foo = 17; -}; -\end{listing} +\begin{prog} +[nick = eg] \\- +class Example : Super \{ \\ \ind + int foo = 17; \- \\ +\}; +\end{prog} means the same as -\begin{listing} -[nick = eg] -class Example : Super { - int foo; - eg.foo = 17; -}; -\end{listing} +\begin{prog} +[nick = eg] \\- +class Example : Super \{ \\ \ind + int foo; \\ + eg.foo = 17; \- \\ +\}; +\end{prog} \subsubsection{Initializer items} \begin{grammar} -- 2.11.0