GetSpan

Trait GetSpan 

Source
pub trait GetSpan {
    // Required method
    fn span(&self) -> TextSpan;
}
Expand description

A trait to get the source code position (span) of a node in the AST.

GetSpan helps retrieve the part of the code (location) related to a node in the AST. This is useful for showing where errors happen or for debugging.

Required Methods§

Source

fn span(&self) -> TextSpan

Returns the TextSpan that shows where this AST node is in the source code.

Implementors§