|
@@ -14656,12 +14656,12 @@ function definitions, and therefore the ordering of function
|
|
|
definitions does not matter.
|
|
|
%
|
|
|
\python{The abstract syntax for function parameters in
|
|
|
- figure~\ref{fig:Lfun-syntax} is a list of pairs, where each pair
|
|
|
+ figure~\ref{fig:Lfun-syntax} is a list of pairs, each of which
|
|
|
consists of a parameter name and its type. This design differs from
|
|
|
Python's \code{ast} module, which has a more complex structure for
|
|
|
function parameters to handle keyword parameters,
|
|
|
defaults, and so on. The type checker in \code{type\_check\_Lfun} converts the
|
|
|
- complex Python abstract syntax into the simpler syntax of
|
|
|
+ complex Python abstract syntax into the simpler syntax shown in
|
|
|
figure~\ref{fig:Lfun-syntax}. The fourth and sixth parameters of the
|
|
|
\code{FunctionDef} constructor are for decorators and a type
|
|
|
comment, neither of which are used by our compiler. We recommend
|
|
@@ -15719,7 +15719,7 @@ function to handle expressions in tail context, called
|
|
|
\code{explicate\_tail}. The function should take an expression and the
|
|
|
dictionary of basic blocks and produce a list of statements in the
|
|
|
\LangCFun{} language. The \code{explicate\_tail} function should
|
|
|
-include cases for \code{Begin}, \code{IfExp}, \code{Let}, \code{Call},
|
|
|
+include cases for \code{Begin}, \code{IfExp}, \code{Let}, and \code{Call},
|
|
|
and a default case for other kinds of expressions. The default case
|
|
|
should produce a \code{Return} statement. The case for \code{Call}
|
|
|
should change it into \code{TailCall}. The other cases should
|