6.5.1.1. Nodes (Entities)

Node Types

Routines

A node-routine Routine represents functions, subprograms, methods, member functions, and similar callable entities of the language.

The concrete kind of callable entity is specified by subtypes of Routine (e.g., node-method Method) and by attribute values (e.g., Element.Is_Static).

Types

A node-type Type represents types, structs, classes, records, unions, type synonyms, interfaces, and similar entities of the type systems of various languages.

The concrete kind of type is specified by subtypes of Type (e.g., node-class Class) and by attribute values (e.g., Element.Is_Enum).

Note

Basic types like int or float in C/C++ are not represented. Typically, such types are used frequently and convey little useful analysis information. However, it is recorded if a programmer uses typedef in C/C++ to create an alias type.

Members

A node-member Member represents fields, data members, record items, and similar entities. A node-member Member is part of the entity that encloses it (via an edge-enclosing Enclosing edge), which is usually a type, but could also be, for example, a class template or, in Rust, an enum variant.

Note

Members do not represent entities that are callable. We use methods for those entities.

Objects

An node-object Object represents variables and constant-like entities of various languages.

Caution

Objects do not represent runtime objects. They are not directly related to object- oriented programming.

Templates

A node-template Template represents uninstantiated template and generic entities, e.g., a generic class, package, or method.

Depending on the options used for translation, the instances are represented by nodes of the respective instance types. These nodes are marked by Element.Is_Template_Instance.