X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/7de8c6661211bce3a2b2739b461f33a370294979..b70cb6d8704405cbb9281f823390f561c03de70c:/doc/clang.tex diff --git a/doc/clang.tex b/doc/clang.tex index 87e8d47..38e4b20 100644 --- a/doc/clang.tex +++ b/doc/clang.tex @@ -756,6 +756,36 @@ function type is the type of the function's return value. @|commentify-argument-names| to the argument list of the given type. \end{describe} +\begin{describe}{fun} + {pprint-c-function-type @ @ + @ @} + Provides the top-level structure for printing C function types. + + Output is written to @ to describe a function type returning + @, whose declarator kernel (containing the name, and any + further type operands) will be printed by @, and whose + arguments, if any, will be printed by @. + + The @ function is a standard kernel-printing function + following the \descref{pprint-c-type}[protocol]{gf}. + + The @ function is given a single argument, which is the + @ to print on. It should not print the surrounding parentheses. + + The output written to @ looks approximately like + \begin{prog} + @ @(@) + \end{prog} +\end{describe} + +\begin{describe}{fun}{pprint-argument-list @ @ @> @} + Print an argument list to @. + + The @ is a list of \descref{argument}[objects]{cls}, optionally + containing an @|:ellipsis| marker. The function returns true if any + arguments were actually printed. +\end{describe} + \subsection{Parsing C types} \label{sec:clang.c-types.parsing} @@ -917,6 +947,8 @@ Temporary names are represented by objects which implement a simple protocol. @|set| & @ @ & @ = @; \\ \hlx{v} @|update| & @ @ @ & @ @= @; \\ \hlx{v} + @|cond| & @ @ @ & @ ? @ : @ + \\ \hlx{v} @|return| & @ & return @[@@]; \\ \hlx{v} @|break| & --- & break; \\ \hlx{v} @@ -933,6 +965,8 @@ Temporary names are represented by objects which implement a simple protocol. @|if| & @ @ @|\&optional| @ & if (@) @ @[else @@] \\ \hlx{v} + @|for| & @ @ @ @ & + for (@; @; @) @ \\ \hlx{v} @|while| & @ @ & while (@) @ \\ \hlx{v} @|do-while| & @ @ & do @ while (@);