|
68 | 68 | \def\WITH{\keyword{with}}
|
69 | 69 | \def\YIELD{\keyword{yield}}
|
70 | 70 |
|
| 71 | +% Used for inline code snippets. |
| 72 | +\newcommand{\code}[1]{\texttt{#1}} |
| 73 | + |
71 | 74 | % Used to specify syntactic sugar.
|
72 | 75 | \def\LET{\keyword{let}}
|
73 | 76 | \newcommand{\Let}[3]{\code{\LET\,\,{#1}\,=\,{#2}\ \IN\ {#3}}}
|
|
78 | 81 | \newcommand{\LetMany}[5]{%
|
79 | 82 | \code{\LET\,\,{#1}\,=\,{#2},\ $\cdots$,\ {#3}\,=\,{#4}\ \IN\ {#5}}}
|
80 | 83 |
|
81 |
| -% Used for inline code snippets. |
82 |
| -\def\code#1{\texttt{#1}} |
| 84 | +% Used for inline meta-code snippets |
| 85 | +\newcommand{\metaCode}[1]{{\color{metaColor}\texttt{#1}}} |
83 | 86 |
|
84 | 87 | % `call` has no special lexical status, so we just use \code{}.
|
85 | 88 | \def\CALL{\code{call}}
|
|
112 | 115 | \definecolor{normativeColor}{rgb}{0,0,0}
|
113 | 116 | \definecolor{commentaryColor}{rgb}{0.5,0.5,0.5}
|
114 | 117 | \definecolor{rationaleColor}{rgb}{0.5,0.5,0.5}
|
| 118 | +\definecolor{metaColor}{rgb}{0,0,1} |
115 | 119 |
|
116 | 120 | % Environments for different kinds of text.
|
117 | 121 | \newenvironment{Q}[1]{{\bf{}Upcoming: {#1}}}{}
|
|
132 | 136 | \newcommand{\Case}[1]{\textbf{Case }$\langle\hspace{0.1em}${#1}$\hspace{0.1em}\rangle$\textbf{.}}
|
133 | 137 | \newcommand{\EndCase}{\mbox{}\hfill$\scriptscriptstyle\Box$\xspace}
|
134 | 138 |
|
135 |
| -\newenvironment{dartCode}[1][!ht] {% |
| 139 | +\newenvironment{dartCode}[1][!ht]{% |
136 | 140 | \def\@programcr{\@addfield\strut}%
|
137 | 141 | \let\\=\@programcr%
|
138 | 142 | \relax\@vobeyspaces\obeylines%
|
139 | 143 | \ttfamily\color{commentaryColor}%
|
140 | 144 | \vspace{1em}%
|
141 | 145 | }{\normalcolor\vspace{1em}}
|
142 | 146 |
|
143 |
| -\newenvironment{normativeDartCode}[1][!ht] {% |
| 147 | +\newenvironment{normativeDartCode}[1][!ht]{% |
144 | 148 | \def\@programcr{\@addfield\strut}%
|
145 | 149 | \let\\=\@programcr%
|
146 | 150 | \relax\@vobeyspaces\obeylines%
|
147 | 151 | \ttfamily\color{normativeColor}%
|
148 | 152 | \vspace{1em}%
|
149 | 153 | }{\normalcolor\vspace{1em}}
|
150 | 154 |
|
| 155 | +\newenvironment{metaLevelCode}[1][!ht]{% |
| 156 | + \def\@programcr{\@addfield\strut}% |
| 157 | + \let\\=\@programcr% |
| 158 | + \relax\@vobeyspaces\obeylines% |
| 159 | + \ttfamily\color{metaColor}% |
| 160 | + \vspace{1em}% |
| 161 | +}{\normalcolor\vspace{1em}} |
| 162 | + |
151 | 163 | % Used for comments in a code context.
|
152 | 164 | \def\comment#1{\textsf{#1}}
|
153 | 165 |
|
|
0 commit comments