Add Free enum variant to the symbol scope to be able to distuingish between true local and free variables.

This commit is contained in:
Windel Bouwman
2019-08-18 12:12:27 +02:00
parent edf647160f
commit eb3771ebff
8 changed files with 51 additions and 18 deletions

View File

@@ -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.