Note that properties will not be set when they aren't applicable. For example, class types, typedefs, etc have .loc, but primitives do not.
The following properties are common to all object types.
- loc: Source location of the object
Dehydra presents AST nodes as variables. These types are used to represent variables, functions, assignments, etc. Variables can have flags describing the context they are used in such as isReturn.
Dehydra calls this for each top-level function or class member function.
- decl: The function declaration.
- name: The function name.
- type: The #Function Type, including parameter types.
- isStatic: True if the node is static
Dehydra provides detailed type objects. A Dehydra type object can represent a primitive type (with .name attribute), a class type (with .name, .members attributes, etc.), a pointer type (with isPointer=true and a type attribute), a reference type (with isReference=true and a .type attribute), or a function pointer type (with .parameters attribute, etc).
Function type objects are an extension of #Variable Objects.
Methods have .fieldOf to indicate the variable being acted upon and .methodOf is the type object of the class implementing the method.
- memberOf: For functions, refers to #Aggregate Type of the class containing the function
Like a method, differentiated by presence of .isConstructor attribute. Constructors generally have a .fieldOf attribute unless they are constructing the return value and .isReturn attribute is present.
This type object represents aggregate types in GCC.