mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
Adjusted spec to use package syntax, thus eliminating bnf.sty
Also fixed many syntax related glitches. Change-Id: I926b93a54ad28d05389a44c969fc2288933f8584 Reviewed-on: https://dart-review.googlesource.com/75580 Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
parent
0315707dec
commit
c3c4e63ce4
2 changed files with 789 additions and 858 deletions
|
@ -1,6 +1,5 @@
|
|||
\def\code#1{\textsf{#1}}
|
||||
\def\builtinId#1{\code{\textbf{#1}}}
|
||||
\def\keyword#1{\code{\textbf{#1}}}
|
||||
\def\builtinId#1{\textsf{\textbf{#1}}}
|
||||
\def\keyword#1{\textsf{\textbf{#1}}}
|
||||
\def\metavar#1{\ensuremath{\mathit{#1}}}
|
||||
|
||||
\def\ABSTRACT{\builtinId{abstract}}
|
||||
|
@ -66,20 +65,16 @@
|
|||
\def\WITH{\keyword{with}}
|
||||
\def\YIELD{\keyword{yield}}
|
||||
|
||||
% Used for inline code snippets.
|
||||
\def\code#1{\texttt{#1}}
|
||||
|
||||
% `call` has no special lexical status, so we just use \code{}.
|
||||
\def\CALL{\code{call}}
|
||||
|
||||
% Used in regular text to indicate that #1 consists of non-terminals.
|
||||
%% TODO(eernst): Update to use grammar font when we start using that;
|
||||
%% at this point we just make it "regular text" using \mbox.
|
||||
\newcommand{\NonTerminal}[1]{\mbox{#1}}
|
||||
|
||||
% Angle brackets used for operators in grammar context.
|
||||
\def\lt{\ensuremath{<}}
|
||||
\def\gt{\ensuremath{>}}
|
||||
|
||||
% A quoted comma as used in the grammar: needs spacing fix.
|
||||
\newcommand{\gcomma}{\mbox{`,\hspace{-0.1em}'}}
|
||||
% Define commands for `<<`, `>>`, `>>>` that avoid introducing guillemets.
|
||||
\def\ltlt{<\mbox <}
|
||||
\def\gtgt{>\mbox >}
|
||||
\def\gtgtgt{>\mbox >\mbox >}
|
||||
|
||||
% Used as line break in the right hand side of a grammar
|
||||
% alternative, that is, when starting a "continuation line".
|
||||
|
@ -102,15 +97,15 @@
|
|||
\newcommand{\Case}[1]{\textbf{Case }$\langle\hspace{0.1em}${#1}$\hspace{0.1em}\rangle$\textbf{.}}
|
||||
|
||||
\newenvironment{dartCode}[1][!ht] {
|
||||
% \begin{verbatim}[#1]
|
||||
\def\@programcr{\@addfield\strut}
|
||||
\let\\=\@programcr
|
||||
\relax\@vobeyspaces\obeylines
|
||||
\def\@programcr{\@addfield\strut}%
|
||||
\let\\=\@programcr%
|
||||
\relax\@vobeyspaces\obeylines%
|
||||
\ttfamily%
|
||||
\vspace{1em}
|
||||
}{\vspace{1em}}
|
||||
|
||||
\sffamily
|
||||
}{
|
||||
%\end{verbatim}
|
||||
}
|
||||
% Used for comments in a code context.
|
||||
\def\comment#1{\textsf{#1}}
|
||||
|
||||
% A commonly used name for an identifier
|
||||
\newcommand{\id}{\metavar{id}}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue