18.5 Constants
- Scalar constants are the simplest component of the AST.
- A constant is either NULL or a length-1 atomic vector (or scalar)
- e.g.,
TRUE
,1L
,2.5
orx
.
- e.g.,
- We can test for a constant with rlang::is_syntactic_literal().
- Constants are self-quoting in the sense that the expression used to represent a constant is the same constant: