pub struct NodeBuilder<R: RuleId, N: NodeId> { /* private fields */ }Expand description
Helper for constructing CST nodes incrementally.
Implementations§
Source§impl<R: RuleId, N: NodeId> NodeBuilder<R, N>
impl<R: RuleId, N: NodeId> NodeBuilder<R, N>
Sourcepub fn finish<'tokens, 'arena, K, Ctx>(
self,
state: &mut ParserState<'tokens, 'arena, K, R, N, Ctx>,
) -> Nwhere
K: TokenKind,
Ctx: GrammarContext,
pub fn finish<'tokens, 'arena, K, Ctx>(
self,
state: &mut ParserState<'tokens, 'arena, K, R, N, Ctx>,
) -> Nwhere
K: TokenKind,
Ctx: GrammarContext,
Finalize the node and allocate it inside the arena.
Auto Trait Implementations§
impl<R, N> Freeze for NodeBuilder<R, N>
impl<R, N> RefUnwindSafe for NodeBuilder<R, N>where
R: RefUnwindSafe,
N: RefUnwindSafe,
impl<R, N> Send for NodeBuilder<R, N>
impl<R, N> Sync for NodeBuilder<R, N>
impl<R, N> Unpin for NodeBuilder<R, N>
impl<R, N> UnwindSafe for NodeBuilder<R, N>
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