Skip to content

typetext

record TypeText (L : Constructs)

What writing types needs of a dialect and a program: which tag names are unions, whether a struct’s or union’s name comes after its keyword (C) or alone (C++), the boolean type’s name (C’s _Bool, C++’s bool), how a dialect’s type is written (its tag and its children written), whether a variable of a dialect’s type is shown as what it designates (C++‘s references: the object it refers to, as debuggers show it), how a member is labeled given its name and its type written (none hides it: a dialect’s parts the program does not name), and whether a struct by its name is a sequence shown by its elements (data_ pointing to them, size_ of them; true for characters shown as a string), as debuggers’ pretty printers show a library’s containers.

def IntegerType.name (boolean : String) (t : IntegerType) : String

The name of a standard integer type, the boolean type named as given.

def FloatFormat.name (f : FloatFormat) : String

The name of the floating type of the format f by its precision: float for binary32’s, double for binary64’s, long double for any other (x87’s extended format). A target whose double or long double has another type’s format is named as that type.

def FloatFormat.syntax (f : FloatFormat) : TypeSyntax

The written type of the floating format f, by its precision as FloatFormat.name names it.

def TypeText.around (specifier : String) (inner : String) : String

A specifier followed by a declarator (nothing when it is empty; no space before an array’s brackets).

def TypeText.keyword {L : Constructs} (tt : TypeText L) (word : String) (name : String) : String

A struct or union’s name after its keyword (C), or alone (C++, where a class is lowered to a struct); a made-up one as clang shows it without its place (union (unnamed union), Tag.shown).

def TypeText.tag {L : Constructs} (tt : TypeText L) (name : String) : String

A struct or union’s specifier.