pub struct Marker(/* private fields */);Implementations§
Source§impl Marker
impl Marker
Sourcepub fn precede<H: MarkerHost + ?Sized>(self, host: &mut H) -> Marker
pub fn precede<H: MarkerHost + ?Sized>(self, host: &mut H) -> Marker
A new marker starting at the same lexeme, placed before self in the production.
pub fn drop<H: MarkerHost + ?Sized>(self, host: &mut H)
Sourcepub fn rollback_to<H: MarkerHost + ?Sized>(self, host: &mut H)
pub fn rollback_to<H: MarkerHost + ?Sized>(self, host: &mut H)
Rewinds the lexer to this marker and discards it and everything produced after it. Token remaps done since are not undone (same as IntelliJ).
pub fn done<H: MarkerHost + ?Sized>(self, host: &mut H, kind: SyntaxKind)
Sourcepub fn collapse<H: MarkerHost + ?Sized>(self, host: &mut H, kind: SyntaxKind)
pub fn collapse<H: MarkerHost + ?Sized>(self, host: &mut H, kind: SyntaxKind)
Done, and the whole range becomes one leaf of kind (a lazy leaf is reparsed on build).
pub fn done_before<H: MarkerHost + ?Sized>( self, host: &mut H, kind: SyntaxKind, before: Marker, )
Sourcepub fn done_before_3<H: MarkerHost + ?Sized>(
self,
host: &mut H,
kind: SyntaxKind,
before: Marker,
error_message: &str,
)
pub fn done_before_3<H: MarkerHost + ?Sized>( self, host: &mut H, kind: SyntaxKind, before: Marker, error_message: &str, )
doneBefore(type, before, errorMessage).
pub fn error<H: MarkerHost + ?Sized>(self, host: &mut H, message: &str)
pub fn error_before<H: MarkerHost + ?Sized>( self, host: &mut H, message: &str, before: Marker, )
Sourcepub fn set_custom_edge_token_binders<H: MarkerHost + ?Sized>(
self,
host: &mut H,
left: Option<EdgeBinder>,
right: Option<EdgeBinder>,
)
pub fn set_custom_edge_token_binders<H: MarkerHost + ?Sized>( self, host: &mut H, left: Option<EdgeBinder>, right: Option<EdgeBinder>, )
None keeps the current binder for that edge (Java passes null).
Trait Implementations§
impl Copy for Marker
impl Eq for Marker
impl StructuralPartialEq for Marker
Auto Trait Implementations§
impl Freeze for Marker
impl RefUnwindSafe for Marker
impl Send for Marker
impl Sync for Marker
impl Unpin for Marker
impl UnsafeUnpin for Marker
impl UnwindSafe for Marker
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