Each reference has exactly one reference type, stored as the respective number. However, when checking, we may want to allow for one of several types, allowing the combination of the respective bitmasks.

Having reference types is important as R separates a variable definition from a function when resolving an identifier. In c <- 3; print(c(1, 2)) the call to c works normally (as the vector constructor), while writing c <- function(...) ..1 overshadows the built-in and causes print to only output the first element.

Enumeration Members

Argument: 32

The identifier is defined by an argument (which we know nothing about at the moment)

BuiltInConstant: 64

The identifier is defined by a built-in value/constant

BuiltInFunction: 128

The identifier is defined by a built-in function

Constant: 8

The identifier is defined by a constant (includes built-in constant)

Function: 2

The identifier is defined by a function (includes built-in function)

Parameter: 16

The identifier is defined by a parameter (which we know nothing about at the moment)

Unknown: 1

The identifier type is unknown

Variable: 4

The identifier is defined by a variable (includes parameter and argument)