From fe055aa1ae36ee8058a2da7eabc63da913123a69 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 13 Feb 2026 22:54:22 +0100 Subject: Document expressions --- doc/type-system.tex | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'doc/type-system.tex') diff --git a/doc/type-system.tex b/doc/type-system.tex index 4ac36e4..3ae8a30 100644 --- a/doc/type-system.tex +++ b/doc/type-system.tex @@ -124,35 +124,3 @@ begin e := E.one end. \end{lstlisting} - -\chapter{Type operations} - -\chapter{Cast} - -\begin{grammar} - = `cast' `(' `:\@' `)'. -\end{grammar} - -The type of an object can be reinterpreted with a cast expression: \\ -\verb|cast(object: Type)|. - -\chapter{Traits} - -\begin{grammar} - = `#' . - - = `(' [] `)'. -\end{grammar} - -Traits allow to query some information about the types, like their size or -field offset or alignment. Calling a trait looks like a procedure call but -traits names start with a \verb|#| and their arguments are type expressions and -not value expressions. - -Supported compiler traits: - -\begin{itemize} - \item \verb|#size(T)| queries type size. - \item \verb|#align(T)| queries type alignment. - \item \verb|#offset(T, F)| queries the offset of the field \verb|F| in the record \verb|T|. -\end{itemize} -- cgit v1.2.3