Expand description
The Expr union over “any R expression”, and the HasArgList shared
trait for the argument-bearing nodes.
R’s leaf expressions are bare tokens, not LITERAL nodes (1 + 2 is
BINARY_EXPR { INT, PLUS, INT }; a bare name is an IDENT). So Expr
casts from a SyntaxElement (node or token) and carries both node
variants and token-atom variants — a single match Expr::cast(el) then
covers every operand a consumer meets, with no separate “is it an IDENT
token” arm.
Enums§
- Expr
- Any R expression: a compound node (
BINARY_EXPR,CALL_EXPR, …) or a leaf atom token (a name or a literal).
Traits§
- HasArg
List - A node that owns an argument list:
CALL_EXPR(f(…)),SUBSET_EXPR(x[…]), andSUBSET2_EXPR(x[[…]]).