pub struct LowerCtx {
pub notes: Vec<String>,
}Expand description
Context data shared by AST lowering routines.
This context is passed to AstNode::lower methods during AST lowering.
It can be extended to include symbol tables, diagnostics, or other context
needed during the lowering process.
§Usage
use sipha_tree::lowering::LowerCtx;
let mut ctx = LowerCtx::builder()
.build();
// Add notes during lowering
ctx.notes.push("Processing expression".to_string());§Extending
For custom context, create a wrapper:
struct MyLoweringContext {
ctx: LowerCtx,
symbol_table: SymbolTable,
}Fields§
§notes: Vec<String>Future extension point for diagnostics or symbol lookups. Use this to collect notes, warnings, or other information during lowering.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LowerCtx
impl RefUnwindSafe for LowerCtx
impl Send for LowerCtx
impl Sync for LowerCtx
impl Unpin for LowerCtx
impl UnwindSafe for LowerCtx
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