pub struct NodeData<'a> {
pub loc: SourceRange<'a>,
pub stx: Syntax<'a>,
pub scope: Scope<'a>,
pub flags: Flags<NodeFlag>,
}
Fields§
§loc: SourceRange<'a>
§stx: Syntax<'a>
§scope: Scope<'a>
§flags: Flags<NodeFlag>
Implementations§
source§impl<'a> NodeData<'a>
impl<'a> NodeData<'a>
sourcepub fn take(&mut self, session: &'a Session) -> &'a mut NodeData<'a>
pub fn take(&mut self, session: &'a Session) -> &'a mut NodeData<'a>
Move this node into a new node (also allocated on the arena and returned as a mutable reference). This node will be left in an invalid state and must not be used any further.
pub fn replace( &mut self, session: &'a Session, stx: Syntax<'a> ) -> &'a mut NodeData<'a>
sourcepub fn error(&self, typ: SyntaxErrorType) -> SyntaxError<'a>
pub fn error(&self, typ: SyntaxErrorType) -> SyntaxError<'a>
Create an error at this node’s location.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for NodeData<'a>
impl<'a> !Send for NodeData<'a>
impl<'a> !Sync for NodeData<'a>
impl<'a> Unpin for NodeData<'a>
impl<'a> !UnwindSafe for NodeData<'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