Skip to main content

HasArgList

Trait HasArgList 

Source
pub trait HasArgList: AstNode<Language = RLanguage> {
    // Provided methods
    fn arg_list(&self) -> Option<ArgList> { ... }
    fn args(&self) -> impl Iterator<Item = Arg> { ... }
    fn nth_positional(&self, n: usize) -> Option<SyntaxElement> { ... }
    fn named_arg(&self, name: &str) -> Option<SyntaxElement> { ... }
}
Expand description

A node that owns an argument list: CALL_EXPR (f(…)), SUBSET_EXPR (x[…]), and SUBSET2_EXPR (x[[…]]).

Provided Methods§

Source

fn arg_list(&self) -> Option<ArgList>

The ARG_LIST child, if present.

Source

fn args(&self) -> impl Iterator<Item = Arg>

The arguments, each split into optional name and value via Arg.

Source

fn nth_positional(&self, n: usize) -> Option<SyntaxElement>

The value of the nth positional (unnamed) argument, 0-indexed.

Source

fn named_arg(&self, name: &str) -> Option<SyntaxElement>

The value of the argument named name, if present.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§