Trait uvls::core::ast::visitor::Visitor

source ·
pub trait Visitor<'a> {
Show 18 methods // Required methods fn cursor(&self) -> &TreeCursor<'a>; fn cursor_mut(&mut self) -> &mut TreeCursor<'a>; fn source(&self) -> &Rope; fn push_err_raw(&mut self, err: ErrorInfo); // Provided methods fn skip_extra(&mut self) -> bool { ... } fn goto_first_child(&mut self) -> bool { ... } fn goto_named(&mut self) -> bool { ... } fn goto_next_sibling(&mut self) -> bool { ... } fn goto_parent(&mut self) { ... } fn kind(&self) -> &str { ... } fn node(&self) -> Node<'a> { ... } fn child_by_name(&self, name: &str) -> Option<Node<'a>> { ... } fn goto_next_kind(&mut self, kind: &str) -> bool { ... } fn goto_field(&mut self, name: &str) -> bool { ... } fn goto_kind(&mut self, name: &str) -> bool { ... } fn push_error<T: Into<String>>(&mut self, w: u32, error: T) { ... } fn push_error_with_type<T: Into<String>>( &mut self, w: u32, error: T, error_type: ErrorType, ) { ... } fn push_error_node<T: Into<String>>( &mut self, node: Node<'_>, w: u32, error: T, ) { ... }
}

Required Methods§

source

fn cursor(&self) -> &TreeCursor<'a>

source

fn cursor_mut(&mut self) -> &mut TreeCursor<'a>

source

fn source(&self) -> &Rope

source

fn push_err_raw(&mut self, err: ErrorInfo)

Provided Methods§

source

fn skip_extra(&mut self) -> bool

source

fn goto_first_child(&mut self) -> bool

try to go down

source

fn goto_named(&mut self) -> bool

try to goto a named node on the current layer

source

fn goto_next_sibling(&mut self) -> bool

source

fn goto_parent(&mut self)

source

fn kind(&self) -> &str

source

fn node(&self) -> Node<'a>

source

fn child_by_name(&self, name: &str) -> Option<Node<'a>>

source

fn goto_next_kind(&mut self, kind: &str) -> bool

try to go forward at least once until we find a node of kind

source

fn goto_field(&mut self, name: &str) -> bool

try to go forward until we find a node as a field name

source

fn goto_kind(&mut self, name: &str) -> bool

try to go forward until we find a node of kind name

source

fn push_error<T: Into<String>>(&mut self, w: u32, error: T)

source

fn push_error_with_type<T: Into<String>>( &mut self, w: u32, error: T, error_type: ErrorType, )

source

fn push_error_node<T: Into<String>>(&mut self, node: Node<'_>, w: u32, error: T)

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> Visitor<'a> for State<'a>

source§

impl<'a> Visitor<'a> for VisitorCollapse<'a>

source§

impl<'a> Visitor<'a> for VisitorGraph<'a>

source§

impl<'a> Visitor<'a> for VisitorState<'a>