pub enum MatchAction {
None,
Pop {
count: usize,
},
Push {
pop_before: usize,
push: ContextPush,
with_prototype: Vec<CompiledPattern>,
},
Set {
pop_before: usize,
set: ContextPush,
with_prototype: Vec<CompiledPattern>,
},
Embed {
pop_before: usize,
embed: String,
embed_scope: Vec<String>,
escape_source: String,
escape: Arc<Regex>,
escape_captures: HashMap<u32, Vec<String>>,
with_prototype: Vec<CompiledPattern>,
},
}Expand description
Action to apply after a match is found.
Variants§
None
No stack action.
Pop
Pop one or more contexts from the stack.
Push
Push one or more contexts onto the stack.
Fields
§
push: ContextPushContext(s) to push.
§
with_prototype: Vec<CompiledPattern>Prototype patterns applied while the pushed contexts are active.
Set
Replace (set) the current context stack with new contexts.
Fields
§
set: ContextPushContext(s) to set (push after popping).
§
with_prototype: Vec<CompiledPattern>Prototype patterns applied while the new contexts are active.
Embed
Temporarily embed another syntax until an escape pattern is matched.
Fields
§
with_prototype: Vec<CompiledPattern>Prototype patterns applied while embedded.
Trait Implementations§
Source§impl Clone for MatchAction
impl Clone for MatchAction
Source§fn clone(&self) -> MatchAction
fn clone(&self) -> MatchAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MatchAction
impl RefUnwindSafe for MatchAction
impl Send for MatchAction
impl Sync for MatchAction
impl Unpin for MatchAction
impl UnsafeUnpin for MatchAction
impl UnwindSafe for MatchAction
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