pub struct Node<'a>(_);Implementations§
source§impl<'a> Node<'a>
impl<'a> Node<'a>
pub fn try_get<'b>(self) -> Result<Ref<'b, NodeData<'a>>, BorrowError>
pub fn try_get_mut<'b>(self) -> Result<RefMut<'b, NodeData<'a>>, BorrowMutError>
pub fn get<'b>(self) -> Ref<'b, NodeData<'a>>
pub fn get_mut<'b>(self) -> RefMut<'b, NodeData<'a>>
pub fn new( session: &'a Session, scope: Scope<'a>, loc: SourceRange<'a>, stx: Syntax<'a> ) -> Node<'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. This borrows the Node and will panic if there’s an existing mutable borrow.
sourcepub fn loc(self) -> SourceRange<'a>
pub fn loc(self) -> SourceRange<'a>
Get the location. This borrows the Node and will panic if there’s an existing mutable borrow.
sourcepub fn stx<'b>(self) -> Ref<'b, Syntax<'a>>
pub fn stx<'b>(self) -> Ref<'b, Syntax<'a>>
Get a non-mutable reference to the syntax. This non-mutably borrows the entire Node for the entire lifetime of the returned reference.