pub struct GreenBuilder<L: Language> { /* private fields */ }Expand description
Green tree builder for constructing nodes from child elements.
This builder provides a fluent API for constructing green nodes in an incremental parsing system.
Implementations§
Source§impl<L: Language> GreenBuilder<L>
impl<L: Language> GreenBuilder<L>
Sourcepub fn token(self, kind: L::SyntaxKind, len: usize) -> Self
pub fn token(self, kind: L::SyntaxKind, len: usize) -> Self
Sourcepub fn push(self, elem: GreenTree<L::SyntaxKind>) -> Self
pub fn push(self, elem: GreenTree<L::SyntaxKind>) -> Self
Sourcepub fn finish(self, kind: L::SyntaxKind) -> Arc<GreenNode<L::SyntaxKind>>
pub fn finish(self, kind: L::SyntaxKind) -> Arc<GreenNode<L::SyntaxKind>>
Trait Implementations§
Source§impl<L: Clone + Language> Clone for GreenBuilder<L>where
L::SyntaxKind: Clone,
impl<L: Clone + Language> Clone for GreenBuilder<L>where
L::SyntaxKind: Clone,
Source§fn clone(&self) -> GreenBuilder<L>
fn clone(&self) -> GreenBuilder<L>
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<L> Freeze for GreenBuilder<L>
impl<L> RefUnwindSafe for GreenBuilder<L>
impl<L> Send for GreenBuilder<L>
impl<L> Sync for GreenBuilder<L>
impl<L> Unpin for GreenBuilder<L>
impl<L> UnwindSafe for GreenBuilder<L>
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