Struct cfg::sequence::Sequence
[−]
[src]
pub struct Sequence<H> { pub lhs: Symbol, pub rhs: Symbol, pub start: u32, pub end: Option<u32>, pub separator: Separator, pub history: H, }
Sequence rule representation.
Fields
lhs | The rule's left-hand side. |
rhs | The rule's right-hand side. |
start | The minimum number of repetitions. |
end | Either the inclusive maximum number of repetitions, or |
separator | The way elements are separated in a sequence, or |
history | The history carried with the sequence rule. |
Methods
impl<H> Sequence<H>
fn inclusive(self, start: u32, end: Option<u32>) -> Self
Assigns the inclusive range of the number of repetitions.
fn separator(self, sep: Separator) -> Self
Assigns the separator symbol and mode of separation.