pub struct Ident(/* private fields */);Implementations§
Source§impl Ident
impl Ident
Sourcepub fn constant(&self) -> Option<RConstant>
pub fn constant(&self) -> Option<RConstant>
Classify the identifier as one of R’s special constant symbols, if it is
one. T/F classify as RConstant::TSymbol/RConstant::FSymbol
even though they are rebindable base bindings — callers that must exclude
them use Ident::is_reserved_constant.
Sourcepub fn is_bool_symbol(&self) -> bool
pub fn is_bool_symbol(&self) -> bool
The rebindable boolean symbols T / F.
Sourcepub fn is_implicit_method_var(&self) -> bool
pub fn is_implicit_method_var(&self) -> bool
An implicit method-dispatch variable (.Generic, .Method, .Class),
bound automatically by R inside an S3/S4 (group-)generic method body. It
is always defined there, so the semantic model treats it as never a
resolvable read rather than an undefined symbol.
Sourcepub fn is_dots(&self) -> bool
pub fn is_dots(&self) -> bool
A dot-dot placeholder (..., ..1), lexed as IDENT but not
scope-resolvable.
Sourcepub fn is_reserved_constant(&self) -> bool
pub fn is_reserved_constant(&self) -> bool
A reserved constant that is a value, not a symbol reference. Mirrors
crate::parser::expr::ident_is_special_constant (NA*, NULL,
TRUE, FALSE, Inf, NaN) and excludes the rebindable T/F; this
is the set the semantic model skips when recording identifier reads.