pub struct ASTWalkContext {
pub context_stack_references: Vec<Vec<ContextPath>>,
pub context_stack: Vec<ContextPath>,
pub locals: HashSet<String>,
pub local_contexts: Vec<HashSet<String>>,
pub globals: HashSet<String>,
}Expand description
The ASTWalkContext structure represents the accumulated state during an Abstract Syntax Tree (AST) walk.
This context provides a way to track and evaluate references within the AST, allowing for filtered subsets of the AST to be built.
§Properties
context_stack_references: A vector of vectors that stores the ContextPath values. Each inner vector represents a stack frame in the evaluation process.context_stack: A vector that tracks the current context path.locals: A set of strings representing local variables defined within the AST.local_contexts: A vector of sets, where each set represents a separate local context.globals: A set of strings representing global variables defined within the AST.
Fields§
§context_stack_references: Vec<Vec<ContextPath>>§context_stack: Vec<ContextPath>§locals: HashSet<String>§local_contexts: Vec<HashSet<String>>§globals: HashSet<String>Trait Implementations§
Source§impl Default for ASTWalkContext
impl Default for ASTWalkContext
Source§fn default() -> ASTWalkContext
fn default() -> ASTWalkContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ASTWalkContext
impl RefUnwindSafe for ASTWalkContext
impl Send for ASTWalkContext
impl Sync for ASTWalkContext
impl Unpin for ASTWalkContext
impl UnwindSafe for ASTWalkContext
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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