chiark
/
gitweb
/
~mdw
/
sod
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d95243
)
doc/syntax.tex: Replace `listing' environments with `prog'.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000
(09:26 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 22 Jul 2017 17:13:30 +0000
(18:13 +0100)
doc/syntax.tex
patch
|
blob
|
blame
|
history
diff --git
a/doc/syntax.tex
b/doc/syntax.tex
index 64b10f46764658719d5b1b824610d4df3db93aaf..0b7456f57f2310bfebfed52df2f5755dd2dc7a1c 100644
(file)
--- a/
doc/syntax.tex
+++ b/
doc/syntax.tex
@@
-578,17
+578,17
@@
keyword arguments.
A @<class-forward-declaration> informs Sod that an @<identifier> 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,
A @<class-forward-declaration> informs Sod that an @<identifier> 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{
listin
g}
+\begin{
pro
g}
class Sub;
class Sub;
-
-class Super : SodObject
{
- Sub *sub;
-};
-
-class Sub : Super
{
- /*
... */
-};
-\end{
listin
g}
+\\+
+class Super : SodObject
\{ \\ \ind
+ Sub *sub;
\- \\
+
\
};
+\\+
+class Sub : Super
\{ \\ \ind
+ /*
\dots */ \- \\
+
\
};
+\end{
pro
g}
\subsubsection{Full class definitions}
\begin{grammar}
\subsubsection{Full class definitions}
\begin{grammar}
@@
-664,20
+664,20
@@
functions are fine.
An @<initializer>, if present, is treated as if a separate
@<initializer-item> containing the slot name and initializer were present.
For example,
An @<initializer>, if present, is treated as if a separate
@<initializer-item> containing the slot name and initializer were present.
For example,
-\begin{
listin
g}
-[nick = eg]
-class Example : Super
{
- int foo = 17;
-};
-\end{
listin
g}
+\begin{
pro
g}
+[nick = eg]
\\-
+class Example : Super
\{ \\ \ind
+ int foo = 17;
\- \\
+
\
};
+\end{
pro
g}
means the same as
means the same as
-\begin{
listin
g}
-[nick = eg]
-class Example : Super
{
- int foo;
- eg.foo = 17;
-};
-\end{
listin
g}
+\begin{
pro
g}
+[nick = eg]
\\-
+class Example : Super
\{ \\ \ind
+ int foo;
\\
+ eg.foo = 17;
\- \\
+
\
};
+\end{
pro
g}
\subsubsection{Initializer items}
\begin{grammar}
\subsubsection{Initializer items}
\begin{grammar}