C and C++

ASTs: Other Types

These are language-independent base enums for ASTs.

Some of these enums describe the values that might be stored in a specific AST field. The following table decribes how the various API implementation handles such cases.

API implementation Handling for enum-valued AST fields
C++ The value is stored in a cs::ast_field of type cs::ast_field_type::ENUMERATION. Get its symbolic name with cs::ast_field::as_enum_value_string; its numerical value with cs::ast_field::as_enum_value_int32.
Python The value is stored in a cs.ast_field of type cs.ast_field_type.ENUMERATION. Get its symbolic name with cs.ast_field.as_enum_value_string; its numerical value with cs.ast_field.as_enum_value_int32.
C A cs_ast_enum_value object encapsulates the enum value and its corresponding string representation, within a cs_ast_field of type csft_enumeration


Ordinals

Ordinal base_lm_ordinals
csao_base_first = -1 first
csao_base_bit_size = csao_base_first bit-size
csao_base_character_kind = csao_base_bit_size -1 character-kind
csao_base_element_type = csao_base_character_kind - 1 element-type
csao_base_float_kind = csao_base_element_type - 1 float-kind
csao_base_has_ellipsis = csao_base_float_kind - 1 has-ellipsis
csao_base_integer_kind = csao_base_has_ellipsis - 1 integer-kind
csao_base_is_bit_field = csao_base_integer_kind - 1 is-bit-field
csao_base_is_complete = csao_base_is_bit_field - 1 is-complete
csao_base_is_final = csao_base_is_complete - 1 is-final
csao_base_is_vla = csao_base_is_final - 1 is-vla
csao_base_name = csao_base_is_vla - 1 name
csao_base_num_elements = csao_base_name - 1 num-elements
csao_base_offset = csao_base_num_elements - 1 offset
csao_base_pointed_to = csao_base_offset - 1 pointed-to
csao_base_real_value = csao_base_pointed_to - 1 real-value
csao_base_return_type = csao_base_real_value - 1 return-type
csao_base_calling_convention = csao_base_return_type - 1 calling-convention
csao_base_size = csao_base_calling_convention - 1 size
csao_base_storage_class = csao_base_size - 1 storage-class
csao_base_type = csao_base_storage_class - 1 type
csao_base_value = csao_base_type - 1 value
csao_base_abs_loc = csao_base_value - 1 abs-loc
csao_base_is_virtual = csao_base_abs_loc - 1 is-virtual
csao_base_special_function_kind = csao_base_is_virtual - 1 special-function-kind
csao_base_operator_name_kind = csao_base_special_function_kind - 1 operator-name-kind
csao_base_base_classes = csao_base_operator_name_kind - 1 base-classes
csao_base_alignment = csao_base_base_classes - 1 alignment
csao_base_is_unsigned = csao_base_alignment - 1 is-unsigned
csao_base_value_returned_by_cctor = csao_base_is_unsigned - 1 value-returned-by-cctor
csao_base_any_virtual_functions_including_in_base_classes = csao_base_value_returned_by_cctor - 1 any-virtual-functions-including-in-base-classes
csao_base_compiler_generated = csao_base_any_virtual_functions_including_in_base_classes - 1 compiler-generated
csao_base_register = csao_base_compiler_generated - 1 register
csao_base_prototyped = csao_base_register - 1 prototyped
csao_base_attributes = csao_base_prototyped - 1 attributes
csao_base_is_reference = csao_base_attributes - 1 is-reference
csao_base_is_rvalue_reference = csao_base_is_reference - 1 is-rvalue-reference
csao_base_last = csao_base_is_rvalue_reference - 1 last