Use NodeId for Binding source (#4234)
This commit is contained in:
@@ -3,8 +3,8 @@ use std::ops::{Deref, Index, IndexMut};
|
||||
|
||||
use bitflags::bitflags;
|
||||
use ruff_text_size::TextRange;
|
||||
use rustpython_parser::ast::Stmt;
|
||||
|
||||
use crate::node::NodeId;
|
||||
use crate::scope::ScopeId;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -14,7 +14,7 @@ pub struct Binding<'a> {
|
||||
/// The context in which the binding was created.
|
||||
pub context: ExecutionContext,
|
||||
/// The statement in which the [`Binding`] was defined.
|
||||
pub source: Option<&'a Stmt>,
|
||||
pub source: Option<NodeId>,
|
||||
/// Tuple of (scope index, range) indicating the scope and range at which
|
||||
/// the binding was last used in a runtime context.
|
||||
pub runtime_usage: Option<(ScopeId, TextRange)>,
|
||||
|
||||
Reference in New Issue
Block a user