Struct uvls::core::ast::graph::VisitorGraph

source ·
struct VisitorGraph<'a> {
    cursor: TreeCursor<'a>,
    dot: String,
    source: &'a Rope,
    root_name: Option<String>,
}

Fields§

§cursor: TreeCursor<'a>§dot: String§source: &'a Rope§root_name: Option<String>

Implementations§

source§

impl<'a> VisitorGraph<'a>

source

fn begin(&mut self)

Generate Graph Code:

source

fn add_feature(&mut self, feature: GraphNode)

source

fn add_legend(&mut self)

source

fn begin_constraints(&mut self)

source

fn add_constraint(&mut self, span: Range<usize>)

source

fn end_constraints(&mut self)

source

fn end(&mut self)

source

fn header(&self) -> Option<Node<'a>>

Trait Implementations§

source§

impl<'a> Clone for VisitorGraph<'a>

source§

fn clone(&self) -> VisitorGraph<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'b> SymbolSlice for VisitorGraph<'b>

source§

fn slice_raw(&self, node: Range<usize>) -> Cow<'_, str>

source§

fn slice(&self, node: Node<'_>) -> Cow<'_, str>

source§

fn name(&self, node: Node<'_>) -> Ustr

source§

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

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, _: ErrorInfo)

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)

Auto Trait Implementations§

§

impl<'a> Freeze for VisitorGraph<'a>

§

impl<'a> RefUnwindSafe for VisitorGraph<'a>

§

impl<'a> !Send for VisitorGraph<'a>

§

impl<'a> !Sync for VisitorGraph<'a>

§

impl<'a> Unpin for VisitorGraph<'a>

§

impl<'a> UnwindSafe for VisitorGraph<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
§

impl<T> To for T
where T: ?Sized,

§

fn to<T>(self) -> T
where Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more