pub struct PureRustPerlParser { /* private fields */ }Expand description
Pure Rust Perl parser implementation
Implementations§
Source§impl PureRustPerlParser
impl PureRustPerlParser
pub fn new() -> Self
pub fn parse(&mut self, source: &str) -> Result<AstNode, Box<dyn Error>>
pub fn build_ast( &mut self, pairs: Pairs<'_, Rule>, ) -> Result<AstNode, Box<dyn Error>>
Sourcepub fn build_node(
&mut self,
pair: Pair<'_, Rule>,
) -> Result<Option<AstNode>, Box<dyn Error>>
pub fn build_node( &mut self, pair: Pair<'_, Rule>, ) -> Result<Option<AstNode>, Box<dyn Error>>
Public wrapper that uses stacker to grow the stack as needed.
This remains public so bridge consumers (for example tree-sitter-perl-rs
with v2-pest-microcrate) can continue calling internal v2 build paths.
pub fn to_sexp(&self, node: &AstNode) -> String
pub fn node_to_sexp(node: &AstNode) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PureRustPerlParser
impl RefUnwindSafe for PureRustPerlParser
impl Send for PureRustPerlParser
impl Sync for PureRustPerlParser
impl Unpin for PureRustPerlParser
impl UnsafeUnpin for PureRustPerlParser
impl UnwindSafe for PureRustPerlParser
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