pub struct FunctionExpr(/* private fields */);Implementations§
Source§impl FunctionExpr
impl FunctionExpr
pub fn lparen_index(&self) -> Option<usize>
pub fn rparen_index(&self) -> Option<usize>
Sourcepub fn formals(&self) -> Vec<Formal>
pub fn formals(&self) -> Vec<Formal>
The function’s formal arguments in source order, including their optional default-value syntax and exact source ranges.
Sourcepub fn params(&self) -> Vec<Param>
pub fn params(&self) -> Vec<Param>
The function’s parameters as a names-only compatibility projection.
Use Self::formals when default syntax or full formal ranges are
needed.
Sourcepub fn body(&self) -> Option<SyntaxElement<RLanguage>>
pub fn body(&self) -> Option<SyntaxElement<RLanguage>>
The function body — the expression that follows the ). May be any
expression node (a BLOCK_EXPR for function(x) { ... }, or any other
expression for function(x) x + 1). Returns None if the body was
missing or replaced by an error-recovery placeholder.
Trait Implementations§
Source§impl AstNode for FunctionExpr
impl AstNode for FunctionExpr
Source§impl Clone for FunctionExpr
impl Clone for FunctionExpr
Source§impl Debug for FunctionExpr
impl Debug for FunctionExpr
impl Eq for FunctionExpr
Source§impl Hash for FunctionExpr
impl Hash for FunctionExpr
Source§impl PartialEq for FunctionExpr
impl PartialEq for FunctionExpr
impl StructuralPartialEq for FunctionExpr
Auto Trait Implementations§
impl !RefUnwindSafe for FunctionExpr
impl !Send for FunctionExpr
impl !Sync for FunctionExpr
impl !UnwindSafe for FunctionExpr
impl Freeze for FunctionExpr
impl Unpin for FunctionExpr
impl UnsafeUnpin for FunctionExpr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more