repeat

Attribute Macro repeat 

Source
#[repeat]
Expand description

On Vec<_> typed fields, specifies additional config for how the repeated elements should be parsed. In particular, this annotation takes the following named arguments:

  • non_empty - if this argument is true, then there must be at least one element parsed

§Example

#[rust_sitter::repeat(non_empty = true)]
numbers: Vec<Number>