struct VisitorState<'a> {
errors: Vec<ErrorInfo>,
cursor: TreeCursor<'a>,
ast: Ast,
source: &'a Rope,
}
Fields§
§errors: Vec<ErrorInfo>
§cursor: TreeCursor<'a>
§ast: Ast
§source: &'a Rope
Implementations§
source§impl<'a> VisitorState<'a>
impl<'a> VisitorState<'a>
fn add_constraint( &mut self, constraint: ConstraintDecl, scope: Symbol, ) -> Symbol
fn add_ref(&mut self, path: Path, scope: Symbol) -> Symbol
fn add_ref_direct(&mut self, path: Path) -> Symbol
sourcefn connect(&mut self)
fn connect(&mut self)
create the import tree map and the general search index for name resolution
sourcefn push_child(&mut self, parent: Symbol, child: Symbol)
fn push_child(&mut self, parent: Symbol, child: Symbol)
Add a child to parent
sourcefn push_error_blk<T: Into<String>>(&mut self, w: u32, error: T)
fn push_error_blk<T: Into<String>>(&mut self, w: u32, error: T)
Push an error with location of the current block header
fn push_error_blk_with_quickfix<T: Into<String>>( &mut self, w: u32, error: T, error_type: ErrorType, )
Trait Implementations§
source§impl<'a> Clone for VisitorState<'a>
impl<'a> Clone for VisitorState<'a>
source§fn clone(&self) -> VisitorState<'a>
fn clone(&self) -> VisitorState<'a>
Returns a copy 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 moresource§impl<'b> SymbolSlice for VisitorState<'b>
impl<'b> SymbolSlice for VisitorState<'b>
source§impl<'a> Visitor<'a> for VisitorState<'a>
impl<'a> Visitor<'a> for VisitorState<'a>
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)
fn skip_extra(&mut self) -> bool
source§fn goto_first_child(&mut self) -> bool
fn goto_first_child(&mut self) -> bool
try to go down
source§fn goto_named(&mut self) -> bool
fn goto_named(&mut self) -> bool
try to goto a named node on the current layer
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>>
source§fn goto_next_kind(&mut self, kind: &str) -> bool
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
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
fn goto_kind(&mut self, name: &str) -> bool
try to go forward until we find a node of kind name
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)
Auto Trait Implementations§
impl<'a> Freeze for VisitorState<'a>
impl<'a> RefUnwindSafe for VisitorState<'a>
impl<'a> !Send for VisitorState<'a>
impl<'a> !Sync for VisitorState<'a>
impl<'a> Unpin for VisitorState<'a>
impl<'a> UnwindSafe for VisitorState<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more