mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08: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:
1 parent
edf647160f
commit
eb3771ebff
8 files changed
+51
-18
No files matched your search
@@ -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