Skip to main content

Module list_macro

Module list_macro 

Source
Expand description

Parser for the list! macro.

A simple macro for constructing R lists from Rust values.

// Named entries (like R's list())
list!(
    alpha = 1,
    beta = "hello",
    gamma = vec![1, 2, 3],
)

// Unnamed entries
list!(1, "hello", vec![1, 2, 3])

// Mixed (unnamed entries get empty string names)
list!(alpha = 1, 2, beta = "hello")

Structs§

ListEntry
A single entry in the list.
ListInput
Parsed list! macro input containing zero or more entries.

Enums§

ListName
Name for a list entry – either a Rust identifier or a string literal.

Functions§

expand_list
Expands a parsed list! invocation into a List constructor token stream.