pub struct Alt {
pub s: Vec<String>,
pub b: usize,
pub p: Option<String>,
pub r: Option<String>,
pub a: Vec<String>,
pub g: String,
}Expand description
One alternative of a rule’s open or close list.
The fields are the jsonic alt fields this grammar uses:
s (the token sequence to match), b (how many of those matched tokens to
push back rather than consume), p (push a child rule), r (replace this
rule), a (actions to run) and g (the alt’s tag groups).
Fields§
§s: Vec<String>Token names this alt matches, in order. Empty matches unconditionally.
b: usizeTokens to push back — matched, recorded, but left for the next rule.
p: Option<String>The child rule to push after this alt’s actions run.
r: Option<String>The rule to replace this one with after this alt’s actions run.
a: Vec<String>Action references (@cssXxx), run in order.
g: StringComma-separated tag groups, for diagnostics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Alt
impl RefUnwindSafe for Alt
impl Send for Alt
impl Sync for Alt
impl Unpin for Alt
impl UnsafeUnpin for Alt
impl UnwindSafe for Alt
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