pub struct WithMetaData<T> {
pub node: T,
pub start: SourcePosition,
pub end: SourcePosition,
}
Expand description
A wrapper struct that adds source position to an AST node.
Fields§
§node: T
The AST node
start: SourcePosition
The starting position of the AST node in the source code
end: SourcePosition
The ending position of the AST node in the source code
Trait Implementations§
Source§impl<T: AstVisitor> AstVisitor for WithMetaData<T>
impl<T: AstVisitor> AstVisitor for WithMetaData<T>
fn visit( &self, emitter: &mut dyn AstConverting, ) -> Result<TraversalResult, String>
Source§impl<T: Clone> Clone for WithMetaData<T>
impl<T: Clone> Clone for WithMetaData<T>
Source§fn clone(&self) -> WithMetaData<T>
fn clone(&self) -> WithMetaData<T>
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<T: Debug> Debug for WithMetaData<T>
impl<T: Debug> Debug for WithMetaData<T>
Source§impl<T: Display> Display for WithMetaData<T>
Implementing Display trait for WithMetaData struct
impl<T: Display> Display for WithMetaData<T>
Implementing Display trait for WithMetaData struct
Source§impl<T: PartialEq> PartialEq for WithMetaData<T>
impl<T: PartialEq> PartialEq for WithMetaData<T>
Source§impl<T: PartialOrd> PartialOrd for WithMetaData<T>
impl<T: PartialOrd> PartialOrd for WithMetaData<T>
impl<T: Eq> Eq for WithMetaData<T>
impl<T> StructuralPartialEq for WithMetaData<T>
Auto Trait Implementations§
impl<T> Freeze for WithMetaData<T>where
T: Freeze,
impl<T> RefUnwindSafe for WithMetaData<T>where
T: RefUnwindSafe,
impl<T> Send for WithMetaData<T>where
T: Send,
impl<T> Sync for WithMetaData<T>where
T: Sync,
impl<T> Unpin for WithMetaData<T>where
T: Unpin,
impl<T> UnwindSafe for WithMetaData<T>where
T: UnwindSafe,
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