mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Add Free enum variant to the symbol scope to be able to distuingish between true local and free variables.
This commit is contained in:
@@ -59,10 +59,19 @@ bitflags! {
|
||||
pub type Label = usize;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
/// An indication where the name must be accessed.
|
||||
pub enum NameScope {
|
||||
/// The name will be in the local scope.
|
||||
Local,
|
||||
|
||||
/// The name will be located in scope surrounding the current scope.
|
||||
NonLocal,
|
||||
|
||||
/// The name will be in global scope.
|
||||
Global,
|
||||
|
||||
/// The name will be located in any scope between the current scope and the top scope.
|
||||
Free,
|
||||
}
|
||||
|
||||
/// Transforms a value prior to formatting it.
|
||||
|
||||
Reference in New Issue
Block a user